<!DOCTYPE html>
<!-- saved from url=(0078)http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/ -->
<html lang="en-US" prefix="og: http://ogp.me/ns#"><!--<![endif]--><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><script async="" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/v2"></script><script async="" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/bpke50xRmr5kLLacwqm_6r.js"></script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>Raspberry Pi Webcam Using MJPG-Server: Internet Live-stre</title>
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="http://jacobsalmela.com/xmlrpc.php">
<!--[if lt IE 9]>
<script src="http://jacobsalmela.com/wp-content/themes/twentytwelve/js/html5.js" type="text/javascript"></script>
<![endif]-->

<!-- This site is optimized with the Yoast WordPress SEO plugin v1.6.3 - https://yoast.com/wordpress/plugins/seo/ -->
<meta name="description" content="Access a Webcam connected to your Raspberry Pi over the Internet using MJPG-Streamer. Access your Webcam from a unique domain name using MJPG-Streamer.">
<link rel="canonical" href="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre.html">
<meta property="og:locale" content="en_US">
<meta property="og:type" content="article">
<meta property="og:title" content="Raspberry Pi Webcam Using MJPG-Server: Internet Live-stre">
<meta property="og:description" content="Access a Webcam connected to your Raspberry Pi over the Internet using MJPG-Streamer. Access your Webcam from a unique domain name using MJPG-Streamer.">
<meta property="og:url" content="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/">
<meta property="og:site_name" content="Jacob Salmela">
<meta property="article:tag" content="dns">
<meta property="article:tag" content="projects">
<meta property="article:tag" content="raspberrypi">
<meta property="article:section" content="Projects">
<meta property="article:section" content="Raspberry Pi">
<meta property="article:published_time" content="2014-05-31T14:18:19+00:00">
<meta property="article:modified_time" content="2014-09-16T13:12:32+00:00">
<meta property="og:updated_time" content="2014-09-16T13:12:32+00:00">
<meta property="og:image" content="http://jacobsalmela.com/wp-content/uploads/2014/05/piwebcam.png">
<meta property="og:image" content="http://www.jacobsalmela.com/wp-content/uploads/2014/05/picamheadon.jpg">
<meta property="og:image" content="http://www.jacobsalmela.com/wp-content/uploads/2014/05/catcam.png">
<meta property="og:image" content="http://www.jacobsalmela.com/wp-content/uploads/2014/05/pioverinternet.png">
<!-- / Yoast WordPress SEO plugin. -->

<link rel="alternate" type="application/rss+xml" title="Jacob Salmela » Feed" href="http://jacobsalmela.com/feed/">
<link rel="alternate" type="application/rss+xml" title="Jacob Salmela » Comments Feed" href="http://jacobsalmela.com/comments/feed/">
<link rel="alternate" type="application/rss+xml" title="Jacob Salmela » Raspberry Pi Webcam Over the Internet Using MJPG-Streamer Comments Feed" href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/feed/">
<link rel="stylesheet" id="jetpack_likes-css" href="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/style.css" type="text/css" media="all">
<link rel="stylesheet" id="jetpack-subscriptions-css" href="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/subscriptions.css" type="text/css" media="all">
<link rel="stylesheet" id="jetpack_related-posts-css" href="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/related-posts.css" type="text/css" media="all">
<link rel="stylesheet" id="crayon-css" href="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/crayon.min.css" type="text/css" media="all">
<link rel="stylesheet" id="crayon-theme-vs2012-css" href="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/vs2012.css" type="text/css" media="all">
<link rel="stylesheet" id="crayon-font-monaco-css" href="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/monaco.css" type="text/css" media="all">
<link rel="stylesheet" id="twentytwelve-fonts-css" href="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/css" type="text/css" media="all">
<link rel="stylesheet" id="twentytwelve-style-css" href="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/style(1).css" type="text/css" media="all">
<!--[if lt IE 9]>
<link rel='stylesheet' id='twentytwelve-ie-css'  href='http://jacobsalmela.com/wp-content/themes/twentytwelve/css/ie.css?ver=20121010' type='text/css' media='all' />
<![endif]-->
<link rel="stylesheet" id="sharedaddy-css" href="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/sharing.css" type="text/css" media="all">
<link rel="stylesheet" id="genericons-css" href="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/genericons.css" type="text/css" media="all">
<!-- This site uses the Yoast Google Analytics plugin v5.0.7 - Universal disabled - https://yoast.com/wordpress/plugins/google-analytics/ -->
<script async="" type="text/javascript" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/ti.js"></script><script type="text/javascript" async="" src="http://www.google-analytics.com/ga.js"></script><script type="text/javascript">

	var _gaq = _gaq || [];
	_gaq.push(['_setAccount', 'UA-35125502-3']);
	_gaq.push(['_gat._forceSSL']);
	_gaq.push(['_trackPageview']);

	(function () {
		var ga = document.createElement('script');
		ga.type = 'text/javascript';
		ga.async = true;
		ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
		var s = document.getElementsByTagName('script')[0];
		s.parentNode.insertBefore(ga, s);
	})();

</script><style type="text/css"></style>
<!-- / Yoast Google Analytics -->
<script type="text/javascript" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/jquery.js"></script>
<script type="text/javascript" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/jquery-migrate.min.js"></script>
<script type="text/javascript" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/postmessage.js"></script>
<script type="text/javascript" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/jquery.inview.js"></script>
<script type="text/javascript" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/jquery.jetpack-resize.js"></script>
<script type="text/javascript" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/related-posts.js"></script>
<script type="text/javascript">
/* <![CDATA[ */
var CrayonSyntaxSettings = {"version":"2.6.8","is_admin":"0","ajaxurl":"http:\/\/jacobsalmela.com\/wp-admin\/admin-ajax.php","prefix":"crayon-","setting":"crayon-setting","selected":"crayon-setting-selected","changed":"crayon-setting-changed","special":"crayon-setting-special","orig_value":"data-orig-value","debug":""};
var CrayonSyntaxStrings = {"copy":"Press %s to Copy, %s to Paste","minimize":"Click To Expand Code"};
/* ]]> */
</script>
<script type="text/javascript" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/crayon.min.js"></script>
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://jacobsalmela.com/xmlrpc.php?rsd">
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://jacobsalmela.com/wp-includes/wlwmanifest.xml"> 
<meta name="generator" content="WordPress 4.0">
<link rel="shortlink" href="http://jacobsalmela.com/?p=1659">
<script async="" src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><script>window.dynamicgoogletags={defs:[]};dynamicgoogletags.defs.push({"position":"firstChild","clearBoth":true,"marginBottom":"10px","adSlot":"9802138735","occurrenceIndex":0,"adFormat":"auto","marginTop":"10px","tagName":"BODY","adClient":"ca-pub-1980021850534238"});dynamicgoogletags.defs.push({"id":"secondary","position":"firstChild","clearBoth":false,"marginBottom":"10px","adSlot":"2278871934","adFormat":"auto","marginTop":"10px","tagName":"DIV","adClient":"ca-pub-1980021850534238"});dynamicgoogletags.defs.push({"id":"secondary","position":"lastChild","clearBoth":true,"marginBottom":"10px","adSlot":"3755605135","adFormat":"auto","marginTop":"10px","tagName":"DIV","adClient":"ca-pub-1980021850534238"});(function(){var p=function(c){var e=document,a=null;if(c.id)if(a=e.getElementById(c.id))a=[a];else return[];if(c.tagName)if(a){for(var f=c.tagName,b=[],h=0;h<a.length;++h)a[h].tagName&&a[h].tagName.toUpperCase()==f.toUpperCase()&&b.push(a[h]);a=b}else{a=e.getElementsByTagName(c.tagName);f=[];for(b=0;b<a.length;++b)f.push(a[b]);a=f}if(c.classNames&&0<c.classNames.length)if(a){e=a;a=c.classNames;f=[];for(b=0;b<e.length;++b)l(e[b],a)&&f.push(e[b]);a=f}else{if(!e.body)return[];a=m(c.classNames,e.body)}if("number"==
typeof c.occurrenceIndex&&a)if(a.length>c.occurrenceIndex)a=[a[c.occurrenceIndex]];else return[];if("number"==typeof c.paragraphIndex&&a){e=[];for(f=0;f<a.length;f++){for(var b=[],h=a[f].getElementsByTagName("p"),d=0;d<h.length;++d)100<=n(h[d])&&b.push(h[d]);h=c.paragraphIndex;0>h&&(h+=b.length);0<=h&&h<b.length&&e.push(b[h])}a=e}if(void 0!==c.ignoreMode&&a)switch(c.ignoreMode){case "ignoreFirst":return a.slice(1);case "ignoreLast":return a.slice(0,a.length-1);case "ignoreFirstAndLast":return a.slice(1,
a.length-1)}return a?a:[]},n=function(c){if(3==c.nodeType)return c.length;if(1!=c.nodeType||"SCRIPT"==c.tagName)return 0;for(var e=0,a=0;a<c.childNodes.length;++a)e+=n(c.childNodes[a]);return e},m=function(c,e){if(e.getElementsByClassName){for(var a=e.getElementsByClassName(c.join(" ")),f=[],b=0;b<a.length;++b)f.push(a[b]);return f}a=[];l(e,c)&&a.push(e);for(b=0;b<e.childNodes.length;++b)1==e.childNodes[b].nodeType&&(a=a.concat(m(c,e.childNodes[b])));return a},l=function(c,e){for(var a=c.className?
c.className.split(/\s+/):[],f={},b=0;b<a.length;++b)f[a[b]]=!0;for(b=0;b<e.length;++b)if(!f[e[b]])return!1;return!0};var r=function(c){return-1!=q.indexOf(c)};var q;r:{var s=this.navigator;if(s){var t=s.userAgent;if(t){q=t;break r}}q=""};var u=function(c){return!!c.nextSibling||!!c.parentNode&&u(c.parentNode)};var w=function(){v(!0)},v=function(c){var e=window.dynamicgoogletags.defs;if(e)for(var a=0;a<e.length;a++){var f=e[a];if(!f.placed){var b=c,h=window,d=null,g=p(f);0<g.length&&(d=g[0]);if(d&&("lastChild"!=f.position||b||u(d))){var b=f,k=document,g=k.createElement("div");g.className="googlepublisherpluginad";g.style.textAlign="center";g.style.width="100%";g.style.height="auto";g.style.clear=b.clearBoth?"both":"none";k=k.createElement("ins");k.className="adsbygoogle";k.setAttribute("data-ad-client",
b.adClient);k.setAttribute("data-ad-slot",b.adSlot);k.setAttribute("data-ad-format",b.adFormat);k.setAttribute("data-tag-origin","pso");k.style.display="block";k.style.margin="auto";k.style.backgroundColor="transparent";b.marginTop&&(k.style.marginTop=b.marginTop);b.marginBottom&&(k.style.marginBottom=b.marginBottom);g.appendChild(k);g=b=g;switch(f.position){case "before":d.parentNode&&d.parentNode.insertBefore(g,d);break;case "after":d.parentNode&&d.parentNode.insertBefore(g,d.nextSibling);break;
case "firstChild":d.insertBefore(g,d.firstChild);break;case "lastChild":d.appendChild(g)}"INS"==d.tagName&&l(d,["adsbygoogle-placeholder"])&&(d.style.display="block");!h.dynamicgoogletags.s||r("iPad")||r("Android")&&!r("Mobile")||r("Silk")||!(r("iPod")||r("iPhone")||r("Android")||r("IEMobile"))||(d=b,g=document,b=g.documentElement.clientHeight||g.body.clientHeight,g=g.documentElement.getBoundingClientRect(),k=d.getBoundingClientRect(),(g&&k?k.top-g.top:0)<=b&&d.firstChild&&"INS"==d.firstChild.tagName&&
(d=d.firstChild,"auto"==d.getAttribute("data-ad-format")&&d.setAttribute("data-ad-format","horizontal")));f.placed=!0;d=f.eid;f=f.adChannel;b={};if(d||f)b.params={},d&&(b.params.google_eids=[d]),f&&(b.params.google_ad_channel=f);h.adsbygoogle||(h.adsbygoogle=[]);h.adsbygoogle.push(b)}}}};window.dynamicgoogletags=window.dynamicgoogletags||{};window.dynamicgoogletags.update=v;window.attachEvent&&window.attachEvent("onload",w);window.addEventListener&&(window.addEventListener("load",w,!1),window.addEventListener("DOMContentLoaded",w,!1));})();
</script><!-- BEGIN Tynt Script -->
<script type="text/javascript">
if(document.location.protocol=='http:'){
 var Tynt=Tynt||[];Tynt.push('bpke50xRmr5kLLacwqm_6r');
 (function(){var s=document.createElement('script');s.async="async";s.type="text/javascript";s.src='http://tcr.tynt.com/ti.js';var h=document.getElementsByTagName('script')[0];h.parentNode.insertBefore(s,h);})();
}
</script>
<!-- END Tynt Script -->

<style id="tyntShCSS" type="text/css">#tyntSh div,#tyntSh span,#tyntSh img,#tyntSh a,div#tyntSh{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;line-height:1;background:0;text-align:left}#tyntSh img,#tyntSh span{display:inline}#tyntSh div,div#tyntSh{display:block}div#tyntSh{z-index:9999999;position:absolute;height:62px;margin:10px;overflow:visible;background:#FFF;border-radius:5px;text-align:center;box-shadow: 0 2px 6px rgba(0,0,0,0.5)}div#tyntShTr{margin:-11px auto 0 auto;width:0;height:0;border-left:10px solid transparent;border-right:10px solid transparent;border-bottom:11px solid #F1F1F1}img#tyntShTw,img#tyntShP,img#tyntShFb,img#tyntShLi,img#tyntShGp{cursor:pointer;height:28px;width:28px;margin:3px 3px 2px 3px;vertical-align:bottom}div#tyntShPTL,div#tyntShHFL{color:#888;text-decoration:none;margin:0 0 2px 0;background-color:#F1F1F1;padding:2px 4px;border-radius:5px 5px 0 0}div#tyntShHFL{text-align:right;border-radius:0 0 5px 5px;margin:2px 0 0 0}div#tyntShHFL,span#tyntShHFLs,div#tyntShPTL{font:normal 8px Arial}span#tyntShHFLs{cursor:pointer;}span#tyntShHFLs:hover{color:#555;text-decoration:underline}div#tyntShCB{position:absolute;cursor:pointer;width:14px;height:14px;top:0;right:0;background-position:0 -14px;background-repeat:no-repeat}div#tyntShCB:hover{background-position: 0 0}div.tyntShIh,.tyntShIh div,.tyntShIh span{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;line-height:1;background:0;text-align:left}.tyntShIh img,.tyntShIh span{display:inline}.tyntShIh div,div.tyntShIh{display:block;outline:0}div.tyntShIh{position:absolute;cursor:default;background:transparent url(http://cdn.tynt.com/images/ss/pi.png) no-repeat;width:43px;height:21px;opacity:0;filter:alpha(opacity=0);z-index:9999999;-webkit-transition:opacity 0.5s;-moz-transition:opacity 0.5s}div.tyntIhHover{opacity:1;filter:alpha(opacity=100);cursor:pointer}</style></head>

<body class="single single-post postid-1659 single-format-standard custom-background custom-font-enabled single-author"><div class="googlepublisherpluginad" style="text-align: center; width: 100%; height: auto; clear: both;"><ins class="adsbygoogle" data-ad-client="ca-pub-1980021850534238" data-ad-slot="9802138735" data-ad-format="auto" data-tag-origin="pso" style="display: block; margin: 10px auto; background-color: transparent;"></ins></div>
<div id="page" class="hfeed site">
	<header id="masthead" class="site-header" role="banner">
		<hgroup>
			<h1 class="site-title"><a href="http://jacobsalmela.com/" title="Jacob Salmela" rel="home">Jacob Salmela</a></h1>
			<h2 class="site-description">#!/bin/bash</h2>
		</hgroup>

		<nav id="site-navigation" class="main-navigation" role="navigation">
			<button class="menu-toggle">Menu</button>
			<a class="assistive-text" href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/#content" title="Skip to content">Skip to content</a>
			<div class="menu-main-container"><ul id="menu-main" class="nav-menu"><li id="menu-item-2320" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-2320"><a href="http://jacobsalmela.com/apps/">Apps</a>
<ul class="sub-menu">
	<li id="menu-item-2321" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-2321"><a href="https://github.com/jacobsalmela/tccutil/releases">tccutil.py</a></li>
	<li id="menu-item-2551" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-2551"><a href="https://github.com/jacobsalmela/NCutil">NCutil.py</a></li>
</ul>
</li>
<li id="menu-item-2444" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-2444"><a href="http://jacobsalmela.com/tag/roll-your-own/">Roll-your-own</a>
<ul class="sub-menu">
	<li id="menu-item-2451" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-2451"><a href="http://jacobsalmela.com/roll-your-own-malware-detection/">Malware Detection</a>
	<ul class="sub-menu">
		<li id="menu-item-2448" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-2448"><a href="http://jacobsalmela.com/roll-defense-mac-backdoor-iworm/">Mac.Backdoor.iWorm Detection</a></li>
		<li id="menu-item-2447" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-2447"><a href="http://jacobsalmela.com/roll-protection-new-malware-called-xslcmd/">XSLCmd Detection</a></li>
	</ul>
</li>
	<li id="menu-item-2445" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-2445"><a href="http://jacobsalmela.com/roll-own-lastpass-premium-free/">LastPass Freemium</a></li>
	<li id="menu-item-2446" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-2446"><a href="http://jacobsalmela.com/tell-someone-spying-computer-using-geektool/">Remote Connection Alert</a></li>
</ul>
</li>
<li id="menu-item-1688" class="menu-item menu-item-type-taxonomy menu-item-object-category current-post-ancestor current-menu-ancestor current-menu-parent current-custom-parent menu-item-has-children menu-item-1688"><a href="http://jacobsalmela.com/category/raspberry-pi/">Raspberry Pi</a>
<ul class="sub-menu">
	<li id="menu-item-2386" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-2386"><a href="http://jacobsalmela.com/raspberry-pi-block-ads-adtrap/">Ad-blocker</a>
	<ul class="sub-menu">
		<li id="menu-item-2387" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-2387"><a href="http://jacobsalmela.com/raspberry-pi-ad-blocker-advanced-setup/">Ad-blocker [Advanced]</a></li>
	</ul>
</li>
	<li id="menu-item-2388" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item menu-item-2388"><a href="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre.html">Webcam over the Internet</a></li>
	<li id="menu-item-2389" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-2389"><a href="http://jacobsalmela.com/raspberry-pi-and-routing-turning-a-pi-into-a-router/">Wireless Router</a></li>
	<li id="menu-item-2391" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-2391"><a href="http://jacobsalmela.com/raspberry-pi-cantenna-ultimate-2-4ghz-wardriving-and-long-range-wifi-access/">Cantenna Wardriving</a></li>
	<li id="menu-item-2390" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-2390"><a href="http://jacobsalmela.com/raspberry-pi-webserver-using-lighttpd/">Webserver</a></li>
	<li id="menu-item-2392" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-2392"><a href="http://jacobsalmela.com/setting-up-an-openvpn-server-on-the-raspberry-pi/">OpenVPN Server</a></li>
</ul>
</li>
<li id="menu-item-1477" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-1477"><a href="http://www.jacobsalmela.com/earning-the-ipv6-certification-from-hurricane-electric-on-mac-os-x/">IPv6 Certification</a>
<ul class="sub-menu">
	<li id="menu-item-1475" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-1475"><a href="http://../ipv6-certification-walkthrough-newbie-level-hurricane-electric-part/">Newbie-level</a></li>
	<li id="menu-item-1476" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-1476"><a href="http://www.jacobsalmela.com/ipv6-certification-walkthrough-explorer-level-hurricane-electric-part-2/">Explorer-level</a></li>
	<li id="menu-item-1478" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-1478"><a href="http://www.jacobsalmela.com/ipv6-certification-walkthrough-enthusiast-level-hurricane-electric-part-3/">Enthusiast-level</a></li>
	<li id="menu-item-1479" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-1479"><a href="http://www.jacobsalmela.com/ipv6-certification-walkthrough-administrator-level-hurricane-electric-part-4/">Administrator-level</a></li>
	<li id="menu-item-1501" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-1501"><a href="http://www.jacobsalmela.com/ipv6-certification-walkthrough-professional-level-hurricane-electric-part-5/">Professional-level</a></li>
	<li id="menu-item-1502" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-1502"><a href="http://www.jacobsalmela.com/ipv6-certification-walkthrough-guru-level-hurricane-electric-part-6/">Guru-level</a></li>
	<li id="menu-item-1503" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-1503"><a href="http://www.jacobsalmela.com/ipv6-certification-walkthrough-sage-level-hurricane-electric-part-7/">Sage-level</a></li>
	<li id="menu-item-1504" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-1504"><a href="http://www.jacobsalmela.com/ipv6-certification-walkthrough-beyond-sage-bonus-hurricane-electric-part-8/">Beyond Sage</a></li>
</ul>
</li>
<li id="menu-item-1602" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1602"><a href="http://jacobsalmela.com/contact-me/">Contact Me</a></li>
</ul></div>		</nav><!-- #site-navigation -->

			</header><!-- #masthead -->

	<div id="main" class="wrapper">
	<div id="primary" class="site-content">
		<div id="content" role="main">

			
				
	<article id="post-1659" class="post-1659 post type-post status-publish format-standard has-post-thumbnail hentry category-projects category-raspberry-pi tag-dns tag-projects-2 tag-raspberrypi">
				<header class="entry-header">
			<img width="624" height="345" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/piwebcam-672x372.png" class="attachment-post-thumbnail wp-post-image" alt="piwebcam">
						<h1 class="entry-title">Raspberry Pi Webcam Over the Internet Using MJPG-Streamer</h1>
										<div class="comments-link">
					<a href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/#comments" title="Comment on Raspberry Pi Webcam Over the Internet Using MJPG-Streamer">18 Replies</a>				</div><!-- .comments-link -->
					</header><!-- .entry-header -->

				<div class="entry-content">
			<script><!--
dynamicgoogletags.update();
//--></script><p>View your&nbsp;<a href="http://www.raspberrypi.org/" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article&#39;, &#39;http://www.raspberrypi.org/&#39;, &#39;Raspberry Pi&#39;]);" target="_blank">Raspberry Pi</a>&nbsp;Webcam from anywhere. &nbsp;Connect to it from a unique domain name and check in on your house or pets while you are away.</p>
<h1>Requirements For This Walkthrough</h1>
<h2>Materials</h2>
<ol>
<li>Local network</li>
<li>Mac or PC</li>
<li><a href="http://www.raspberrypi.org/" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article&#39;, &#39;http://www.raspberrypi.org/&#39;, &#39;Raspberry Pi&#39;]);" target="_blank">Raspberry Pi</a> <a href="http://www.raspberrypi.org/product/camera-module/" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article&#39;, &#39;http://www.raspberrypi.org/product/camera-module/&#39;, &#39;camera module&#39;]);" target="_blank">camera module</a>, a&nbsp;<a href="http://elinux.org/RPi_USB_Webcams" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article&#39;, &#39;http://elinux.org/RPi_USB_Webcams&#39;, &#39;Compatible Webcam&#39;]);" target="_blank">Compatible Webcam</a> (or the <a href="http://www.amazon.com/Logitech-Portable-1080p-Webcam-Autofocus/dp/B004YW7WCY/ref=sr_1_6?s=electronics&ie=UTF8&qid=1401542343&sr=1-6&keywords=c510" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article&#39;, &#39;http://www.amazon.com/Logitech-Portable-1080p-Webcam-Autofocus/dp/B004YW7WCY/ref=sr_1_6?s=electronics&amp;ie=UTF8&amp;qid=1401542343&amp;sr=1-6&amp;keywords=c510&#39;, &#39;exact same one I used&#39;]);" target="_blank">exact same one I used</a> to write this tutorial)</li>
<li>Raspberry Pi running Raspbian “wheezy”</li>
<li>Domain name</li>
<li>Router capable of supporting <a href="http://dyndns.org/" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article&#39;, &#39;http://dyndns.org&#39;, &#39;DynDNS&#39;]);" target="_blank">DynDNS</a>,&nbsp;<a href="http://www.noip.com/" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article&#39;, &#39;http://www.noip.com/&#39;, &#39;noip&#39;]);" target="_blank">noip</a>, or other dynamic DNS service; or a software-based dynamic DNS client (not covered in this walkthrough)</li>
<li><a href="http://www.jacobsalmela.com/raspberry-pi-webserver-using-lighttpd/" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article-int&#39;, &#39;http://www.jacobsalmela.com/raspberry-pi-webserver-using-lighttpd/&#39;, &#39;lighttpd Web server running on the Pi (&#39;]);" title="Raspberry Pi Webserver Using lighttpd">lighttpd Web server running on the Pi&nbsp;(</a>optional–allows your to embed a stream to a Webpage, which can be password-protected)</li>
<li>HDMI Cable (*optional)</li>
<li>Keyboard (*optional)</li>
<li>Mouse (*optional)</li>
<li>Monitor with HDMI input (*optional)</li>
<li>*If the Raspberry Pi is <a href="http://www.jacobsalmela.com/raspberry-pi-and-ssh-how-to-setup-a-headless-machine-no-monitor-and-pasword-less-logins/" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article-int&#39;, &#39;http://www.jacobsalmela.com/raspberry-pi-and-ssh-how-to-setup-a-headless-machine-no-monitor-and-pasword-less-logins/&#39;, &#39;set up as a headless machine&#39;]);" title="Raspberry Pi and SSH: How-to Setup a Headless Machine (No Monitor) and Pasword-less Logins">set up as a headless machine</a>, you will not need a monitor, keyboard, or mouse–just another computer, which would be used to access it remotely over the network via SSH.</li>
</ol>
<h2>Downloads</h2>
<ol>
<li><a href="http://tcpdiag.dl.sourceforge.net/project/mjpg-streamer/mjpg-streamer/Sourcecode/mjpg-streamer-r63.tar.gz" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article&#39;, &#39;http://tcpdiag.dl.sourceforge.net/project/mjpg-streamer/mjpg-streamer/Sourcecode/mjpg-streamer-r63.tar.gz&#39;, &#39;MJPG-Streamer&#39;]);" target="_blank">MJPG-Streamer</a></li>
</ol>
<h2>Resources</h2>
<ul>
<li><a href="http://blog.miguelgrinberg.com/post/how-to-build-and-run-mjpg-streamer-on-the-raspberry-pi" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article&#39;, &#39;http://blog.miguelgrinberg.com/post/how-to-build-and-run-mjpg-streamer-on-the-raspberry-pi&#39;, &#39;http://blog.miguelgrinberg.com/post/how-to-build-and-run-mjpg-streamer-on-the-raspberry-pi&#39;]);" target="_blank">http://blog.miguelgrinberg.com/post/how-to-build-and-run-mjpg-streamer-on-the-raspberry-pi</a></li>
<li><a href="http://www.instructables.com/id/Create-an-internet-controlled-robot-using-Livebots/step5/Get-the-webcam-streamer-for-Raspberry-Pi/" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article&#39;, &#39;http://www.instructables.com/id/Create-an-internet-controlled-robot-using-Livebots/step5/Get-the-webcam-streamer-for-Raspberry-Pi/&#39;, &#39;http://www.instructables.com/id/Create-an-internet-controlled-robot-using-Livebots/step5/Get-the-webcam-streamer-for-Raspberry-Pi/&#39;]);" target="_blank">http://www.instructables.com/id/Create-an-internet-controlled-robot-using-Livebots/step5/Get-the-webcam-streamer-for-Raspberry-Pi/</a></li>
<li><a href="http://wolfpaulus.com/jounal/embedded/raspberrypi_webcam/" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article&#39;, &#39;http://wolfpaulus.com/jounal/embedded/raspberrypi_webcam/&#39;, &#39;http://wolfpaulus.com/jounal/embedded/raspberrypi_webcam/&#39;]);" target="_blank">http://wolfpaulus.com/jounal/embedded/raspberrypi_webcam/</a></li>
<li><a href="http://www.linuxcircle.com/2013/02/06/faster-video-streaming-on-raspberry-media-server-with-mjpg-streamer/" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article&#39;, &#39;http://www.linuxcircle.com/2013/02/06/faster-video-streaming-on-raspberry-media-server-with-mjpg-streamer/&#39;, &#39;http://www.linuxcircle.com/2013/02/06/faster-video-streaming-on-raspberry-media-server-with-mjpg-streamer/&#39;]);" target="_blank">http://www.linuxcircle.com/2013/02/06/faster-video-streaming-on-raspberry-media-server-with-mjpg-streamer/</a></li>
<li><a href="http://skillfulness.blogspot.com/2010/03/mjpg-streamer-documentation.html" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article&#39;, &#39;http://skillfulness.blogspot.com/2010/03/mjpg-streamer-documentation.html&#39;, &#39;http://skillfulness.blogspot.com/2010/03/mjpg-streamer-documentation.html&#39;]);" target="_blank">http://skillfulness.blogspot.com/2010/03/mjpg-streamer-documentation.html</a></li>
<li><a href="http://www.plugcomputer.org/plugforum/index.php?topic=6231.0" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article&#39;, &#39;http://www.plugcomputer.org/plugforum/index.php?topic=6231.0&#39;, &#39;http://www.plugcomputer.org/plugforum/index.php?topic=6231.0&#39;]);" target="_blank">http://www.plugcomputer.org/plugforum/index.php?topic=6231.0</a></li>
<li><a href="http://iomem.com/index.php?archives/3-Starting-out-with-Lighttpd.html&serendipity%5Bentrypage%5D=4&serendipity%5Bentrypage%5D=all&serendipity%5Bentrypage%5D=all" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article&#39;, &#39;http://iomem.com/index.php?archives/3-Starting-out-with-Lighttpd.html&amp;serendipity%5Bentrypage%5D=4&amp;serendipity%5Bentrypage%5D=all&amp;serendipity%5Bentrypage%5D=all&#39;, &#39;http://iomem.com/index.php?archives/3-Starting-out-with-Lighttpd.html&amp;serendipity%5Bentrypage%5D=4&amp;serendipity%5Bentrypage%5D=all&amp;serendipity%5Bentrypage%5D=all&#39;]);" target="_blank">http://iomem.com/index.php?archives/3-Starting-out-with-Lighttpd.html&amp;serendipity%5Bentrypage%5D=4&amp;serendipity%5Bentrypage%5D=all&amp;serendipity%5Bentrypage%5D=all</a></li>
<li><a href="http://nutz95.wordpress.com/2013/05/14/raspberry-pi-pirider-install-mjpegstreamer/" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article&#39;, &#39;http://nutz95.wordpress.com/2013/05/14/raspberry-pi-pirider-install-mjpegstreamer/&#39;, &#39;http://nutz95.wordpress.com/2013/05/14/raspberry-pi-pirider-install-mjpegstreamer/&#39;]);" target="_blank">http://nutz95.wordpress.com/2013/05/14/raspberry-pi-pirider-install-mjpegstreamer/</a></li>
<li><a href="http://www.phillips321.co.uk/2012/11/05/raspberrypi-webcam-mjpg-stream-cctv/" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article&#39;, &#39;http://www.phillips321.co.uk/2012/11/05/raspberrypi-webcam-mjpg-stream-cctv/&#39;, &#39;http://www.phillips321.co.uk/2012/11/05/raspberrypi-webcam-mjpg-stream-cctv/&#39;]);" target="_blank">http://www.phillips321.co.uk/2012/11/05/raspberrypi-webcam-mjpg-stream-cctv/</a></li>
</ul>
<h1>Step-by-step Walkthrough</h1>
<h2>Short-and-sweet Version (for advanced users)</h2>
<p></p><!-- Crayon Syntax Highlighter v2.6.8 -->

		<div id="crayon-54512ad68a070053290648" class="crayon-syntax crayon-theme-vs2012 crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-always" style="margin-bottom: 20px; float: left; font-size: 12px !important; line-height: 18px !important; height: auto;">
		
			<div class="crayon-plain-wrap"><textarea wrap="soft" class="crayon-plain print-no" data-settings="dblclick" readonly="" style="tab-size: 4; font-size: 12px !important; line-height: 18px !important; z-index: 0; opacity: 0;">lsusb
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libjpeg8-dev imagemagick libv4l-dev
sudo ln -s /usr/include/linux/videodev2.h /usr/include/linux/videodev.h
sudo apt-get install subversion
cd ~
svn co https://svn.code.sf.net/p/mjpg-streamer/code/mjpg-streamer/mjpg-streamer
cd mjpg-streamer
make mjpg_streamer input_file.so input_uvc.so output_http.so
sudo cp mjpg_streamer /usr/local/bin
sudo cp output_http.so input_file.so input_uvc.so /usr/local/lib/
sudo cp -R www /usr/local/www
sudo vi ~/.bashrc
     export LD_LIBRARY_PATH=/usr/local/lib/
source ~/.bashrc
mjpg_streamer -i "input_file.so -f /tmp/stream -n pic.jpg"-o "output_http.so -w /usr/local/www"
sudo vi /usr/sbin/livestream.sh
     #!/bin/bash
     mjpg_streamer -i "/usr/local/lib/input_uvc.so" -o "/usr/local/lib/output_http.so -w /var/www/stream -c username:password"
sudo chmod 755 /etc/init.d/livestream.sh
sudo update-rc.d livestream.sh defaults</textarea></div>
			<div class="crayon-main" style="position: relative; z-index: 1;">
				<table class="crayon-table" style="margin-left: -26px;">
					<tbody><tr class="crayon-row">
				<td class="crayon-nums " data-settings="hide">
					<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 18px !important;"><div class="crayon-num" data-line="crayon-54512ad68a070053290648-1">1</div><div class="crayon-num" data-line="crayon-54512ad68a070053290648-2">2</div><div class="crayon-num" data-line="crayon-54512ad68a070053290648-3">3</div><div class="crayon-num" data-line="crayon-54512ad68a070053290648-4">4</div><div class="crayon-num" data-line="crayon-54512ad68a070053290648-5">5</div><div class="crayon-num" data-line="crayon-54512ad68a070053290648-6">6</div><div class="crayon-num" data-line="crayon-54512ad68a070053290648-7">7</div><div class="crayon-num" data-line="crayon-54512ad68a070053290648-8">8</div><div class="crayon-num" data-line="crayon-54512ad68a070053290648-9">9</div><div class="crayon-num" data-line="crayon-54512ad68a070053290648-10">10</div><div class="crayon-num" data-line="crayon-54512ad68a070053290648-11">11</div><div class="crayon-num" data-line="crayon-54512ad68a070053290648-12">12</div><div class="crayon-num" data-line="crayon-54512ad68a070053290648-13">13</div><div class="crayon-num" data-line="crayon-54512ad68a070053290648-14">14</div><div class="crayon-num crayon-marked-num crayon-top crayon-bottom" data-line="crayon-54512ad68a070053290648-15">15</div><div class="crayon-num" data-line="crayon-54512ad68a070053290648-16">16</div><div class="crayon-num" data-line="crayon-54512ad68a070053290648-17">17</div><div class="crayon-num" data-line="crayon-54512ad68a070053290648-18">18</div><div class="crayon-num crayon-marked-num crayon-top" data-line="crayon-54512ad68a070053290648-19">19</div><div class="crayon-num crayon-marked-num crayon-bottom" data-line="crayon-54512ad68a070053290648-20">20</div><div class="crayon-num" data-line="crayon-54512ad68a070053290648-21">21</div><div class="crayon-num" data-line="crayon-54512ad68a070053290648-22">22</div></div>
				</td>
						<td class="crayon-code"><div class="crayon-pre" style="font-size: 12px !important; line-height: 18px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><div class="crayon-line" id="crayon-54512ad68a070053290648-1"><span class="crayon-e">lsusb</span></div><div class="crayon-line" id="crayon-54512ad68a070053290648-2"><span class="crayon-e">sudo </span><span class="crayon-v">apt</span><span class="crayon-o">-</span><span class="crayon-r">get</span><span class="crayon-h"> </span><span class="crayon-e">update</span></div><div class="crayon-line" id="crayon-54512ad68a070053290648-3"><span class="crayon-e">sudo </span><span class="crayon-v">apt</span><span class="crayon-o">-</span><span class="crayon-r">get</span><span class="crayon-h"> </span><span class="crayon-e">upgrade</span></div><div class="crayon-line" id="crayon-54512ad68a070053290648-4"><span class="crayon-e">sudo </span><span class="crayon-v">apt</span><span class="crayon-o">-</span><span class="crayon-r">get</span><span class="crayon-h"> </span><span class="crayon-e">install </span><span class="crayon-v">libjpeg8</span><span class="crayon-o">-</span><span class="crayon-e">dev </span><span class="crayon-e">imagemagick </span><span class="crayon-v">libv4l</span><span class="crayon-o">-</span><span class="crayon-e">dev</span></div><div class="crayon-line" id="crayon-54512ad68a070053290648-5"><span class="crayon-e">sudo </span><span class="crayon-r">ln</span><span class="crayon-h"> </span><span class="crayon-o">-</span><span class="crayon-v">s</span><span class="crayon-h"> </span><span class="crayon-o">/</span><span class="crayon-v">usr</span><span class="crayon-o">/</span><span class="crayon-v">include</span><span class="crayon-o">/</span><span class="crayon-v">linux</span><span class="crayon-o">/</span><span class="crayon-v">videodev2</span><span class="crayon-e">.h</span><span class="crayon-h"> </span><span class="crayon-o">/</span><span class="crayon-v">usr</span><span class="crayon-o">/</span><span class="crayon-v">include</span><span class="crayon-o">/</span><span class="crayon-v">linux</span><span class="crayon-o">/</span><span class="crayon-v">videodev</span><span class="crayon-e">.h</span></div><div class="crayon-line" id="crayon-54512ad68a070053290648-6"><span class="crayon-e">sudo </span><span class="crayon-v">apt</span><span class="crayon-o">-</span><span class="crayon-r">get</span><span class="crayon-h"> </span><span class="crayon-e">install </span><span class="crayon-e">subversion</span></div><div class="crayon-line" id="crayon-54512ad68a070053290648-7"><span class="crayon-r">cd</span><span class="crayon-h"> </span><span class="crayon-o">~</span></div><div class="crayon-line" id="crayon-54512ad68a070053290648-8"><span class="crayon-e">svn </span><span class="crayon-e">co </span><span class="crayon-v">https</span><span class="crayon-o">:</span><span class="crayon-o">/</span><span class="crayon-o">/</span><span class="crayon-v">svn</span><span class="crayon-e">.code</span><span class="crayon-e">.sf</span><span class="crayon-e">.net</span><span class="crayon-o">/</span><span class="crayon-v">p</span><span class="crayon-o">/</span><span class="crayon-v">mjpg</span><span class="crayon-o">-</span><span class="crayon-v">streamer</span><span class="crayon-o">/</span><span class="crayon-v">code</span><span class="crayon-o">/</span><span class="crayon-v">mjpg</span><span class="crayon-o">-</span><span class="crayon-v">streamer</span><span class="crayon-o">/</span><span class="crayon-v">mjpg</span><span class="crayon-o">-</span><span class="crayon-e">streamer</span></div><div class="crayon-line" id="crayon-54512ad68a070053290648-9"><span class="crayon-r">cd</span><span class="crayon-h"> </span><span class="crayon-v">mjpg</span><span class="crayon-o">-</span><span class="crayon-e">streamer</span></div><div class="crayon-line" id="crayon-54512ad68a070053290648-10"><span class="crayon-r">make</span><span class="crayon-h"> </span><span class="crayon-e">mjpg_streamer </span><span class="crayon-v">input_file</span><span class="crayon-e">.so</span><span class="crayon-h"> </span><span class="crayon-v">input_uvc</span><span class="crayon-e">.so</span><span class="crayon-h"> </span><span class="crayon-v">output_http</span><span class="crayon-e">.so</span></div><div class="crayon-line" id="crayon-54512ad68a070053290648-11"><span class="crayon-e">sudo </span><span class="crayon-r">cp</span><span class="crayon-h"> </span><span class="crayon-v">mjpg_streamer</span><span class="crayon-h"> </span><span class="crayon-o">/</span><span class="crayon-v">usr</span><span class="crayon-o">/</span><span class="crayon-v">local</span><span class="crayon-o">/</span><span class="crayon-e">bin</span></div><div class="crayon-line" id="crayon-54512ad68a070053290648-12"><span class="crayon-e">sudo </span><span class="crayon-r">cp</span><span class="crayon-h"> </span><span class="crayon-v">output_http</span><span class="crayon-e">.so</span><span class="crayon-h"> </span><span class="crayon-v">input_file</span><span class="crayon-e">.so</span><span class="crayon-h"> </span><span class="crayon-v">input_uvc</span><span class="crayon-e">.so</span><span class="crayon-h"> </span><span class="crayon-o">/</span><span class="crayon-v">usr</span><span class="crayon-o">/</span><span class="crayon-v">local</span><span class="crayon-o">/</span><span class="crayon-v">lib</span><span class="crayon-o">/</span></div><div class="crayon-line" id="crayon-54512ad68a070053290648-13"><span class="crayon-e">sudo </span><span class="crayon-r">cp</span><span class="crayon-h"> </span><span class="crayon-o">-</span><span class="crayon-i">R</span><span class="crayon-h"> </span><span class="crayon-v">www</span><span class="crayon-h"> </span><span class="crayon-o">/</span><span class="crayon-v">usr</span><span class="crayon-o">/</span><span class="crayon-v">local</span><span class="crayon-o">/</span><span class="crayon-e">www</span></div><div class="crayon-line" id="crayon-54512ad68a070053290648-14"><span class="crayon-e">sudo </span><span class="crayon-r">vi</span><span class="crayon-h"> </span><span class="crayon-o">~</span><span class="crayon-o">/</span><span class="crayon-e">.bashrc</span></div><div class="crayon-line crayon-marked-line crayon-top crayon-bottom" id="crayon-54512ad68a070053290648-15"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp; </span><span class="crayon-e">export </span><span class="crayon-v">LD_LIBRARY_PATH</span><span class="crayon-o">=</span><span class="crayon-o">/</span><span class="crayon-v">usr</span><span class="crayon-o">/</span><span class="crayon-v">local</span><span class="crayon-o">/</span><span class="crayon-v">lib</span><span class="crayon-o">/</span></div><div class="crayon-line" id="crayon-54512ad68a070053290648-16"><span class="crayon-v">source</span><span class="crayon-h"> </span><span class="crayon-o">~</span><span class="crayon-o">/</span><span class="crayon-e">.bashrc</span></div><div class="crayon-line" id="crayon-54512ad68a070053290648-17"><span class="crayon-v">mjpg_streamer</span><span class="crayon-h"> </span><span class="crayon-o">-</span><span class="crayon-i">i</span><span class="crayon-h"> </span><span class="crayon-s">"input_file.so -f /tmp/stream -n pic.jpg"</span><span class="crayon-o">-</span><span class="crayon-i">o</span><span class="crayon-h"> </span><span class="crayon-s">"output_http.so -w /usr/local/www"</span></div><div class="crayon-line" id="crayon-54512ad68a070053290648-18"><span class="crayon-e">sudo </span><span class="crayon-r">vi</span><span class="crayon-h"> </span><span class="crayon-o">/</span><span class="crayon-v">usr</span><span class="crayon-o">/</span><span class="crayon-v">sbin</span><span class="crayon-o">/</span><span class="crayon-v">livestream</span><span class="crayon-e">.sh</span></div><div class="crayon-line crayon-marked-line crayon-top" id="crayon-54512ad68a070053290648-19"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp; </span><span class="crayon-c">#!/bin/bash</span></div><div class="crayon-line crayon-marked-line crayon-bottom" id="crayon-54512ad68a070053290648-20"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp; </span><span class="crayon-v">mjpg_streamer</span><span class="crayon-h"> </span><span class="crayon-o">-</span><span class="crayon-i">i</span><span class="crayon-h"> </span><span class="crayon-s">"/usr/local/lib/input_uvc.so"</span><span class="crayon-h"> </span><span class="crayon-o">-</span><span class="crayon-i">o</span><span class="crayon-h"> </span><span class="crayon-s">"/usr/local/lib/output_http.so -w /var/www/stream -c username:password"</span></div><div class="crayon-line" id="crayon-54512ad68a070053290648-21"><span class="crayon-e">sudo </span><span class="crayon-r">chmod</span><span class="crayon-h"> </span><span class="crayon-cn">755</span><span class="crayon-h"> </span><span class="crayon-o">/</span><span class="crayon-v">etc</span><span class="crayon-o">/</span><span class="crayon-v">init</span><span class="crayon-e">.d</span><span class="crayon-o">/</span><span class="crayon-v">livestream</span><span class="crayon-e">.sh</span></div><div class="crayon-line" id="crayon-54512ad68a070053290648-22"><span class="crayon-e">sudo </span><span class="crayon-v">update</span><span class="crayon-o">-</span><span class="crayon-v">rc</span><span class="crayon-e">.d</span><span class="crayon-h"> </span><span class="crayon-v">livestream</span><span class="crayon-e">.sh</span><span class="crayon-h"> </span><span class="crayon-v">defaults</span></div></div></td>
					</tr>
				</tbody></table>
			</div>
		</div>
<!-- [Format Time: 0.0063 seconds] -->
<p></p>
<h2>Conceptual Overview</h2>
<ol>
<li>Update the Raspberry Pi and install software dependencies</li>
<li>Download the MJPG-Streamer source code</li>
<li>Compile the source code</li>
<li>Capture images from the Webcam and serve them on a Webpage</li>
<li>Set MJPG-Streamer to run at boot</li>
</ol>
<h2>Two Methods: Camera Module or USB Webcam</h2>
<p>You can use&nbsp;the Raspberry Pi camera module, or any compatible USB Webcam. &nbsp;I found that that the USB Webcam method is easier and better quality, but there are instructions for both. &nbsp;In the walkthrough, I’ll be using a USB Webcam. &nbsp;The camera module instructions can be found in the appendix.</p>
<h1>Step-by-step Walkthrough</h1>
<h2>Check If the Pi Recognizes the Webcam</h2>
<p>Plug in the USB Webcam and run the command:</p><!-- Crayon Syntax Highlighter v2.6.8 -->

		<div id="crayon-54512ad68a084267014397" class="crayon-syntax crayon-theme-vs2012 crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-always" style="margin-bottom: 20px; float: left; font-size: 12px !important; line-height: 18px !important; height: auto;">
		
			<div class="crayon-plain-wrap"><textarea wrap="soft" class="crayon-plain print-no" data-settings="dblclick" readonly="" style="tab-size: 4; font-size: 12px !important; line-height: 18px !important; z-index: 0; opacity: 0;">lsusb</textarea></div>
			<div class="crayon-main" style="position: relative; z-index: 1;">
				<table class="crayon-table" style="margin-left: -19px;">
					<tbody><tr class="crayon-row">
				<td class="crayon-nums " data-settings="hide">
					<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 18px !important;"><div class="crayon-num" data-line="crayon-54512ad68a084267014397-1">1</div></div>
				</td>
						<td class="crayon-code"><div class="crayon-pre" style="font-size: 12px !important; line-height: 18px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><div class="crayon-line" id="crayon-54512ad68a084267014397-1"><span class="crayon-v">lsusb</span></div></div></td>
					</tr>
				</tbody></table>
			</div>
		</div>
<!-- [Format Time: 0.0003 seconds] -->
<p>Look for an entry relating to your Webcam. &nbsp;This is a good indicator it has been recognized.</p>
<h2><img class="alignnone size-full wp-image-1714" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/picamheadon.jpg" alt="picamheadon" width="800" height="600"></h2>
<h2>Update Pi and Install Dependencies</h2>
<p>First, <strong>update</strong> the Raspberry Pi and then install some of the <strong>dependencies</strong> of MJPG-Streamer.</p><!-- Crayon Syntax Highlighter v2.6.8 -->

		<div id="crayon-54512ad68a08a141517878" class="crayon-syntax crayon-theme-vs2012 crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-always" style="margin-bottom: 20px; float: left; font-size: 12px !important; line-height: 18px !important; height: auto;">
		
			<div class="crayon-plain-wrap"><textarea wrap="soft" class="crayon-plain print-no" data-settings="dblclick" readonly="" style="tab-size: 4; font-size: 12px !important; line-height: 18px !important; z-index: 0; opacity: 0;">sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libjpeg8-dev imagemagick libv4l-dev</textarea></div>
			<div class="crayon-main" style="position: relative; z-index: 1;">
				<table class="crayon-table" style="margin-left: -19px;">
					<tbody><tr class="crayon-row">
				<td class="crayon-nums " data-settings="hide">
					<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 18px !important;"><div class="crayon-num" data-line="crayon-54512ad68a08a141517878-1">1</div><div class="crayon-num" data-line="crayon-54512ad68a08a141517878-2">2</div><div class="crayon-num" data-line="crayon-54512ad68a08a141517878-3">3</div></div>
				</td>
						<td class="crayon-code"><div class="crayon-pre" style="font-size: 12px !important; line-height: 18px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><div class="crayon-line" id="crayon-54512ad68a08a141517878-1"><span class="crayon-e">sudo </span><span class="crayon-v">apt</span><span class="crayon-o">-</span><span class="crayon-r">get</span><span class="crayon-h"> </span><span class="crayon-e">update</span></div><div class="crayon-line" id="crayon-54512ad68a08a141517878-2"><span class="crayon-e">sudo </span><span class="crayon-v">apt</span><span class="crayon-o">-</span><span class="crayon-r">get</span><span class="crayon-h"> </span><span class="crayon-e">upgrade</span></div><div class="crayon-line" id="crayon-54512ad68a08a141517878-3"><span class="crayon-e">sudo </span><span class="crayon-v">apt</span><span class="crayon-o">-</span><span class="crayon-r">get</span><span class="crayon-h"> </span><span class="crayon-e">install </span><span class="crayon-v">libjpeg8</span><span class="crayon-o">-</span><span class="crayon-e">dev </span><span class="crayon-e">imagemagick </span><span class="crayon-v">libv4l</span><span class="crayon-o">-</span><span class="crayon-v">dev</span></div></div></td>
					</tr>
				</tbody></table>
			</div>
		</div>
<!-- [Format Time: 0.0009 seconds] -->
<p>An adjustment needs to be made: &nbsp;the 
			<span id="crayon-54512ad68a08f368148656" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-v">videodev</span><span class="crayon-e">.h</span></span></span>&nbsp;&nbsp;file has been replaced with 
			<span id="crayon-54512ad68a094075947916" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-v">videodev2</span><span class="crayon-e">.h</span></span></span>&nbsp;&nbsp;but this change needs to be made manually. &nbsp;To do this, just create a <strong>symbolic link</strong>.</p><!-- Crayon Syntax Highlighter v2.6.8 -->

		<div id="crayon-54512ad68a098988668144" class="crayon-syntax crayon-theme-vs2012 crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-always" style="margin-bottom: 20px; float: left; font-size: 12px !important; line-height: 18px !important; height: auto;">
		
			<div class="crayon-plain-wrap"><textarea wrap="soft" class="crayon-plain print-no" data-settings="dblclick" readonly="" style="tab-size: 4; font-size: 12px !important; line-height: 18px !important; z-index: 0; opacity: 0;">sudo ln -s /usr/include/linux/videodev2.h /usr/include/linux/videodev.h</textarea></div>
			<div class="crayon-main" style="position: relative; z-index: 1;">
				<table class="crayon-table" style="margin-left: -19px;">
					<tbody><tr class="crayon-row">
				<td class="crayon-nums " data-settings="hide">
					<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 18px !important;"><div class="crayon-num" data-line="crayon-54512ad68a098988668144-1">1</div></div>
				</td>
						<td class="crayon-code"><div class="crayon-pre" style="font-size: 12px !important; line-height: 18px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><div class="crayon-line" id="crayon-54512ad68a098988668144-1"><span class="crayon-e">sudo </span><span class="crayon-r">ln</span><span class="crayon-h"> </span><span class="crayon-o">-</span><span class="crayon-v">s</span><span class="crayon-h"> </span><span class="crayon-o">/</span><span class="crayon-v">usr</span><span class="crayon-o">/</span><span class="crayon-v">include</span><span class="crayon-o">/</span><span class="crayon-v">linux</span><span class="crayon-o">/</span><span class="crayon-v">videodev2</span><span class="crayon-e">.h</span><span class="crayon-h"> </span><span class="crayon-o">/</span><span class="crayon-v">usr</span><span class="crayon-o">/</span><span class="crayon-v">include</span><span class="crayon-o">/</span><span class="crayon-v">linux</span><span class="crayon-o">/</span><span class="crayon-v">videodev</span><span class="crayon-e">.h</span></div></div></td>
					</tr>
				</tbody></table>
			</div>
		</div>
<!-- [Format Time: 0.0011 seconds] -->
<p></p>
<h2>Download and Compile&nbsp;MJPG-Streamer</h2>
<p>Unfortunately, MJPG-Streamer isn’t available via 
			<span id="crayon-54512ad68a09d980543568" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-v">apt</span><span class="crayon-o">-</span><span class="crayon-r">get</span></span></span>&nbsp;, so we need to <strong>compile it from source</strong>. &nbsp;This may be more complex than <a href="http://pingbin.com/2012/12/raspberry-pi-web-cam-server-motion/" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article&#39;, &#39;http://pingbin.com/2012/12/raspberry-pi-web-cam-server-motion/&#39;, &#39;setting up a Webcam using Motion&#39;]);" target="_blank">setting up a Webcam using Motion</a>, but I found&nbsp;MJPG-Streamer to be less resource-intensive so the additional complexity of setting it up is worth it.</p>
<p>There are a few different ways to install MJPG-Streamer. &nbsp;The easiest is via <strong>subversion</strong>, which is what I will walkthrough. &nbsp;If you want directions for some other methods, look in the appendix at the bottom of the post.</p>
<h3>Download&nbsp;via Subversion (svn)</h3>
<p>Install subversion (if necessaary).</p><!-- Crayon Syntax Highlighter v2.6.8 -->

		<div id="crayon-54512ad68a0a5968486640" class="crayon-syntax crayon-theme-vs2012 crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-always" style="margin-bottom: 20px; float: left; font-size: 12px !important; line-height: 18px !important; height: auto;">
		
			<div class="crayon-plain-wrap"><textarea wrap="soft" class="crayon-plain print-no" data-settings="dblclick" readonly="" style="tab-size: 4; font-size: 12px !important; line-height: 18px !important; z-index: 0; opacity: 0;">sudo apt-get install subversion</textarea></div>
			<div class="crayon-main" style="position: relative; z-index: 1;">
				<table class="crayon-table" style="margin-left: -19px;">
					<tbody><tr class="crayon-row">
				<td class="crayon-nums " data-settings="hide">
					<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 18px !important;"><div class="crayon-num" data-line="crayon-54512ad68a0a5968486640-1">1</div></div>
				</td>
						<td class="crayon-code"><div class="crayon-pre" style="font-size: 12px !important; line-height: 18px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><div class="crayon-line" id="crayon-54512ad68a0a5968486640-1"><span class="crayon-e">sudo </span><span class="crayon-v">apt</span><span class="crayon-o">-</span><span class="crayon-r">get</span><span class="crayon-h"> </span><span class="crayon-e">install </span><span class="crayon-v">subversion</span></div></div></td>
					</tr>
				</tbody></table>
			</div>
		</div>
<!-- [Format Time: 0.0004 seconds] -->
<p>Then,&nbsp;download a copy of the MJPG-Streamer source code to your home folder and move into the directory when the download is complete:</p><!-- Crayon Syntax Highlighter v2.6.8 -->

		<div id="crayon-54512ad68a0aa964288260" class="crayon-syntax crayon-theme-vs2012 crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-always" style="margin-bottom: 20px; float: left; font-size: 12px !important; line-height: 18px !important; height: auto;">
		
			<div class="crayon-plain-wrap"><textarea wrap="soft" class="crayon-plain print-no" data-settings="dblclick" readonly="" style="tab-size: 4; font-size: 12px !important; line-height: 18px !important; z-index: 0; opacity: 0;">cd ~
svn co https://svn.code.sf.net/p/mjpg-streamer/code/mjpg-streamer/ mjpg-streamer
cd mjpg-streamer</textarea></div>
			<div class="crayon-main" style="position: relative; z-index: 1;">
				<table class="crayon-table" style="margin-left: -19px;">
					<tbody><tr class="crayon-row">
				<td class="crayon-nums " data-settings="hide">
					<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 18px !important;"><div class="crayon-num" data-line="crayon-54512ad68a0aa964288260-1">1</div><div class="crayon-num" data-line="crayon-54512ad68a0aa964288260-2">2</div><div class="crayon-num" data-line="crayon-54512ad68a0aa964288260-3">3</div></div>
				</td>
						<td class="crayon-code"><div class="crayon-pre" style="font-size: 12px !important; line-height: 18px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><div class="crayon-line" id="crayon-54512ad68a0aa964288260-1"><span class="crayon-r">cd</span><span class="crayon-h"> </span><span class="crayon-o">~</span></div><div class="crayon-line" id="crayon-54512ad68a0aa964288260-2"><span class="crayon-e">svn </span><span class="crayon-e">co </span><span class="crayon-v">https</span><span class="crayon-o">:</span><span class="crayon-o">/</span><span class="crayon-o">/</span><span class="crayon-v">svn</span><span class="crayon-e">.code</span><span class="crayon-e">.sf</span><span class="crayon-e">.net</span><span class="crayon-o">/</span><span class="crayon-v">p</span><span class="crayon-o">/</span><span class="crayon-v">mjpg</span><span class="crayon-o">-</span><span class="crayon-v">streamer</span><span class="crayon-o">/</span><span class="crayon-v">code</span><span class="crayon-o">/</span><span class="crayon-v">mjpg</span><span class="crayon-o">-</span><span class="crayon-v">streamer</span><span class="crayon-o">/</span><span class="crayon-h"> </span><span class="crayon-v">mjpg</span><span class="crayon-o">-</span><span class="crayon-e">streamer</span></div><div class="crayon-line" id="crayon-54512ad68a0aa964288260-3"><span class="crayon-r">cd</span><span class="crayon-h"> </span><span class="crayon-v">mjpg</span><span class="crayon-o">-</span><span class="crayon-v">streamer</span></div></div></td>
					</tr>
				</tbody></table>
			</div>
		</div>
<!-- [Format Time: 0.0012 seconds] -->
<p>There are a lot of plugins included with MJPG-Stream, but for this walkthrough, we will just compile&nbsp;three. &nbsp;If you only plan to use a USB Webcam, you can modify the command&nbsp;below to suit your needs. &nbsp;Just leave off the items you do not want.</p>
<ul>
<li><strong>input_uvc.so (for USB Webcams) :</strong> copies JPGs from a single input (the Webcam in this case) to one or more output plugins. &nbsp;This is good for streaming larger images at a higher framerate with lower CPU usage.</li>
<li><strong>input_file.so (for camera module):</strong>&nbsp;similar to the above, but copies them from a directory.</li>
<li><strong>output_http.so:</strong>&nbsp;streams the files to a Webserver</li>
</ul>
<p></p><!-- Crayon Syntax Highlighter v2.6.8 -->

		<div id="crayon-54512ad68a0b0641865329" class="crayon-syntax crayon-theme-vs2012 crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-always" style="margin-bottom: 20px; float: left; font-size: 12px !important; line-height: 18px !important; height: auto;">
		
			<div class="crayon-plain-wrap"><textarea wrap="soft" class="crayon-plain print-no" data-settings="dblclick" readonly="" style="tab-size: 4; font-size: 12px !important; line-height: 18px !important; z-index: 0; opacity: 0;">make mjpg_streamer input_file.so input_uvc.so output_http.so</textarea></div>
			<div class="crayon-main" style="position: relative; z-index: 1;">
				<table class="crayon-table" style="margin-left: -19px;">
					<tbody><tr class="crayon-row">
				<td class="crayon-nums " data-settings="hide">
					<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 18px !important;"><div class="crayon-num" data-line="crayon-54512ad68a0b0641865329-1">1</div></div>
				</td>
						<td class="crayon-code"><div class="crayon-pre" style="font-size: 12px !important; line-height: 18px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><div class="crayon-line" id="crayon-54512ad68a0b0641865329-1"><span class="crayon-r">make</span><span class="crayon-h"> </span><span class="crayon-e">mjpg_streamer </span><span class="crayon-v">input_file</span><span class="crayon-e">.so</span><span class="crayon-h"> </span><span class="crayon-v">input_uvc</span><span class="crayon-e">.so</span><span class="crayon-h"> </span><span class="crayon-v">output_http</span><span class="crayon-e">.so</span></div></div></td>
					</tr>
				</tbody></table>
			</div>
		</div>
<!-- [Format Time: 0.0005 seconds] -->
<p>Alternatively,&nbsp;running 
			<span id="crayon-54512ad68a0b4224220511" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-r">make</span></span></span>&nbsp;, you can&nbsp;compile everything that comes with MJPG-Streamer. &nbsp;I chose to just install what was necessary to save on storage space and resources.</p>
<h3>Copy MJPG-Streamer to an Alternate Location</h3>
<p>You could run MJPG-Streamer right from the folder after it is compiled (
			<span id="crayon-54512ad68a0b9670271984" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-sy">.</span><span class="crayon-o">/</span><span class="crayon-v">mjpg_streamer</span></span></span>&nbsp;), but it might be better to give it a permanent home.</p>
<p>Run the following commands to copy it to a more globally-accessible area:</p><!-- Crayon Syntax Highlighter v2.6.8 -->

		<div id="crayon-54512ad68a0be640061371" class="crayon-syntax crayon-theme-vs2012 crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-always" style="margin-bottom: 20px; float: left; font-size: 12px !important; line-height: 18px !important; height: auto;">
		
			<div class="crayon-plain-wrap"><textarea wrap="soft" class="crayon-plain print-no" data-settings="dblclick" readonly="" style="tab-size: 4; font-size: 12px !important; line-height: 18px !important; z-index: 0; opacity: 0;">sudo cp mjpg_streamer /usr/local/bin
sudo cp output_http.so input_file.so input_uvc.so /usr/local/lib/
sudo cp -R www /usr/local/www</textarea></div>
			<div class="crayon-main" style="position: relative; z-index: 1;">
				<table class="crayon-table" style="margin-left: -19px;">
					<tbody><tr class="crayon-row">
				<td class="crayon-nums " data-settings="hide">
					<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 18px !important;"><div class="crayon-num" data-line="crayon-54512ad68a0be640061371-1">1</div><div class="crayon-num" data-line="crayon-54512ad68a0be640061371-2">2</div><div class="crayon-num" data-line="crayon-54512ad68a0be640061371-3">3</div></div>
				</td>
						<td class="crayon-code"><div class="crayon-pre" style="font-size: 12px !important; line-height: 18px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><div class="crayon-line" id="crayon-54512ad68a0be640061371-1"><span class="crayon-e">sudo </span><span class="crayon-r">cp</span><span class="crayon-h"> </span><span class="crayon-v">mjpg_streamer</span><span class="crayon-h"> </span><span class="crayon-o">/</span><span class="crayon-v">usr</span><span class="crayon-o">/</span><span class="crayon-v">local</span><span class="crayon-o">/</span><span class="crayon-e">bin</span></div><div class="crayon-line" id="crayon-54512ad68a0be640061371-2"><span class="crayon-e">sudo </span><span class="crayon-r">cp</span><span class="crayon-h"> </span><span class="crayon-v">output_http</span><span class="crayon-e">.so</span><span class="crayon-h"> </span><span class="crayon-v">input_file</span><span class="crayon-e">.so</span><span class="crayon-h"> </span><span class="crayon-v">input_uvc</span><span class="crayon-e">.so</span><span class="crayon-h"> </span><span class="crayon-o">/</span><span class="crayon-v">usr</span><span class="crayon-o">/</span><span class="crayon-v">local</span><span class="crayon-o">/</span><span class="crayon-v">lib</span><span class="crayon-o">/</span></div><div class="crayon-line" id="crayon-54512ad68a0be640061371-3"><span class="crayon-e">sudo </span><span class="crayon-r">cp</span><span class="crayon-h"> </span><span class="crayon-o">-</span><span class="crayon-i">R</span><span class="crayon-h"> </span><span class="crayon-v">www</span><span class="crayon-h"> </span><span class="crayon-o">/</span><span class="crayon-v">usr</span><span class="crayon-o">/</span><span class="crayon-v">local</span><span class="crayon-o">/</span><span class="crayon-v">www</span></div></div></td>
					</tr>
				</tbody></table>
			</div>
		</div>
<!-- [Format Time: 0.0013 seconds] -->
<p>
			<span id="crayon-54512ad68a0c3250957425" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-o">/</span><span class="crayon-v">usr</span><span class="crayon-o">/</span><span class="crayon-v">local</span><span class="crayon-o">/</span></span></span>&nbsp;is a common place for third-party items or things added to a system by an admin. &nbsp;But you could put them wherever you like, or just leave it where it is. &nbsp;You will just need to modify the paths for the rest of the walkthrough.</p>
<h2>Export Paths</h2>
<p>If you did try to run 
			<span id="crayon-54512ad68a0c8374282401" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-v">mjpg_streamer</span></span></span>&nbsp; now, it probably returned an <strong>error about search paths</strong>. &nbsp;This is because right now, the system doesn’t know where to find the files. &nbsp;This is an easy fix. &nbsp;Just append the following line to 
			<span id="crayon-54512ad68a0cc557622971" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-o">~</span><span class="crayon-o">/</span><span class="crayon-e">.bashrc</span></span></span>&nbsp;(assuming you ran the commands above to copy the files to 
			<span id="crayon-54512ad68a0d1560084060" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-o">/</span><span class="crayon-v">usr</span><span class="crayon-o">/</span><span class="crayon-v">local</span><span class="crayon-o">/</span></span></span>&nbsp;. &nbsp;This will make it a permanent change so that you don’t need to do this every time you log in:</p><!-- Crayon Syntax Highlighter v2.6.8 -->

		<div id="crayon-54512ad68a0d5255387397" class="crayon-syntax crayon-theme-vs2012 crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-always" style="margin-bottom: 20px; float: left; font-size: 12px !important; line-height: 18px !important; height: auto;">
		
			<div class="crayon-plain-wrap"><textarea wrap="soft" class="crayon-plain print-no" data-settings="dblclick" readonly="" style="tab-size: 4; font-size: 12px !important; line-height: 18px !important; z-index: 0; opacity: 0;">export LD_LIBRARY_PATH=/usr/local/lib/</textarea></div>
			<div class="crayon-main" style="position: relative; z-index: 1;">
				<table class="crayon-table" style="margin-left: -19px;">
					<tbody><tr class="crayon-row">
				<td class="crayon-nums " data-settings="hide">
					<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 18px !important;"><div class="crayon-num" data-line="crayon-54512ad68a0d5255387397-1">1</div></div>
				</td>
						<td class="crayon-code"><div class="crayon-pre" style="font-size: 12px !important; line-height: 18px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><div class="crayon-line" id="crayon-54512ad68a0d5255387397-1"><span class="crayon-e">export </span><span class="crayon-v">LD_LIBRARY_PATH</span><span class="crayon-o">=</span><span class="crayon-o">/</span><span class="crayon-v">usr</span><span class="crayon-o">/</span><span class="crayon-v">local</span><span class="crayon-o">/</span><span class="crayon-v">lib</span><span class="crayon-o">/</span></div></div></td>
					</tr>
				</tbody></table>
			</div>
		</div>
<!-- [Format Time: 0.0004 seconds] -->
<p></p>
<p class="p1">Now you can either log out and back in again, but it is easier to run the 
			<span id="crayon-54512ad68a0da157364489" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-v">source</span></span></span>&nbsp;&nbsp;command to apply the change (this has the same effect as logging in):</p>
<p></p><!-- Crayon Syntax Highlighter v2.6.8 -->

		<div id="crayon-54512ad68a0de587258975" class="crayon-syntax crayon-theme-vs2012 crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-always" style="margin-bottom: 20px; float: left; font-size: 12px !important; line-height: 18px !important; height: auto;">
		
			<div class="crayon-plain-wrap"><textarea wrap="soft" class="crayon-plain print-no" data-settings="dblclick" readonly="" style="tab-size: 4; font-size: 12px !important; line-height: 18px !important; z-index: 0; opacity: 0;">source ~/.bashrc</textarea></div>
			<div class="crayon-main" style="position: relative; z-index: 1;">
				<table class="crayon-table" style="margin-left: -19px;">
					<tbody><tr class="crayon-row">
				<td class="crayon-nums " data-settings="hide">
					<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 18px !important;"><div class="crayon-num" data-line="crayon-54512ad68a0de587258975-1">1</div></div>
				</td>
						<td class="crayon-code"><div class="crayon-pre" style="font-size: 12px !important; line-height: 18px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><div class="crayon-line" id="crayon-54512ad68a0de587258975-1"><span class="crayon-v">source</span><span class="crayon-h"> </span><span class="crayon-o">~</span><span class="crayon-o">/</span><span class="crayon-e">.bashrc</span></div></div></td>
					</tr>
				</tbody></table>
			</div>
		</div>
<!-- [Format Time: 0.0003 seconds] -->
<p>Now, you can simply call 
			<span id="crayon-54512ad68a0e5098387430" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-v">mjpg_streamer</span></span></span>&nbsp;&nbsp;no matter what directory you are in. &nbsp;We are almost ready to start capturing images.</p>
<h3>Using input_uvc.so to Capture Images</h3>
<p>Start running 
			<span id="crayon-54512ad68a0ea628008155" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-v">mjpg_streamer</span></span></span>&nbsp; with the command:</p><!-- Crayon Syntax Highlighter v2.6.8 -->

		<div id="crayon-54512ad68a0ef609635731" class="crayon-syntax crayon-theme-vs2012 crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-always" style="margin-bottom: 20px; float: left; font-size: 12px !important; line-height: 18px !important; height: auto;">
		
			<div class="crayon-plain-wrap"><textarea wrap="soft" class="crayon-plain print-no" data-settings="dblclick" readonly="" style="tab-size: 4; font-size: 12px !important; line-height: 18px !important; z-index: 0; opacity: 0;">mjpg_streamer -i "/usr/local/lib/input_uvc.so" -o "/usr/local/lib/output_http.so -w /usr/local/www"</textarea></div>
			<div class="crayon-main" style="position: relative; z-index: 1;">
				<table class="crayon-table" style="margin-left: -19px;">
					<tbody><tr class="crayon-row">
				<td class="crayon-nums " data-settings="hide">
					<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 18px !important;"><div class="crayon-num" data-line="crayon-54512ad68a0ef609635731-1">1</div></div>
				</td>
						<td class="crayon-code"><div class="crayon-pre" style="font-size: 12px !important; line-height: 18px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><div class="crayon-line" id="crayon-54512ad68a0ef609635731-1"><span class="crayon-v">mjpg_streamer</span><span class="crayon-h"> </span><span class="crayon-o">-</span><span class="crayon-i">i</span><span class="crayon-h"> </span><span class="crayon-s">"/usr/local/lib/input_uvc.so"</span><span class="crayon-h"> </span><span class="crayon-o">-</span><span class="crayon-i">o</span><span class="crayon-h"> </span><span class="crayon-s">"/usr/local/lib/output_http.so -w /usr/local/www"</span></div></div></td>
					</tr>
				</tbody></table>
			</div>
		</div>
<!-- [Format Time: 0.0005 seconds] -->
<p></p>
<p class="p1">This command options are as follows:</p>
<ul>
<li>
			<span id="crayon-54512ad68a0f3734076295" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-o">-</span><span class="crayon-v">i</span></span></span>&nbsp;: uses <strong>input_uvc.so</strong> (the USB Webcam) as input</li>
<li>
			<span id="crayon-54512ad68a0f8199784082" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-o">-</span><span class="crayon-v">o</span></span></span>&nbsp;: <strong>output_http.so</strong> for the output (sending the images to a Web server</li>
<li>
			<span id="crayon-54512ad68a0fc390046410" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-o">-</span><span class="crayon-v">w</span></span></span>&nbsp;: the directory, which has the HTML, CSS, and JS files:&nbsp;&nbsp;
			<span id="crayon-54512ad68a101981029112" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-o">/</span><span class="crayon-v">usr</span><span class="crayon-o">/</span><span class="crayon-v">local</span><span class="crayon-o">/</span><span class="crayon-v">www</span></span></span></li>
</ul>
<p>You can cancel the stream by pressing <strong>Ctrl+C</strong>. &nbsp;If you want to experiment with some other options, some&nbsp;are listed below:</p>
<ul>
<li>
			<span id="crayon-54512ad68a105905570365" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-o">-</span><span class="crayon-v">b</span></span></span>&nbsp;: runs in the background</li>
<li>
			<span id="crayon-54512ad68a10a087927358" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-o">-</span><span class="crayon-v">p</span></span></span>&nbsp;: set a default port instead of the default 8080</li>
<li>
			<span id="crayon-54512ad68a10e124556386" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-o">-</span><span class="crayon-v">c</span></span></span>&nbsp;: prompts for username:password</li>
<li>
			<span id="crayon-54512ad68a113759639276" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-o">-</span><span class="crayon-i">y</span><span class="crayon-h"> </span><span class="crayon-v">YUYV</span></span></span>&nbsp;:&nbsp;<span style="color: #333333;">enables YUYV format and disables MJPEG mode</span></li>
</ul>
<p>If you used the 
			<span id="crayon-54512ad68a117947615728" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-o">-</span><span class="crayon-v">b</span></span></span>&nbsp;&nbsp;option, you will get your prompt back. &nbsp;So how do you stop it from running? &nbsp;After running the command, you will see a line like:</p><!-- Crayon Syntax Highlighter v2.6.8 -->

		<div id="crayon-54512ad68a11c536417379" class="crayon-syntax crayon-theme-vs2012 crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-always" style="margin-bottom: 20px; float: left; font-size: 12px !important; line-height: 18px !important; height: auto;">
		
			<div class="crayon-plain-wrap"><textarea wrap="soft" class="crayon-plain print-no" data-settings="dblclick" readonly="" style="tab-size: 4; font-size: 12px !important; line-height: 18px !important; z-index: 0; opacity: 0;">forked to background (4979)</textarea></div>
			<div class="crayon-main" style="position: relative; z-index: 1;">
				<table class="crayon-table" style="margin-left: -19px;">
					<tbody><tr class="crayon-row">
				<td class="crayon-nums " data-settings="hide">
					<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 18px !important;"><div class="crayon-num" data-line="crayon-54512ad68a11c536417379-1">1</div></div>
				</td>
						<td class="crayon-code"><div class="crayon-pre" style="font-size: 12px !important; line-height: 18px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><div class="crayon-line" id="crayon-54512ad68a11c536417379-1"><span class="crayon-e">forked </span><span class="crayon-st">to</span><span class="crayon-h"> </span><span class="crayon-e">background</span><span class="crayon-h"> </span><span class="crayon-sy">(</span><span class="crayon-cn">4979</span><span class="crayon-sy">)</span></div></div></td>
					</tr>
				</tbody></table>
			</div>
		</div>
<!-- [Format Time: 0.0004 seconds] -->
<p></p>
<p class="p1">If you want to stop the stream, just run:</p>
<p></p><!-- Crayon Syntax Highlighter v2.6.8 -->

		<div id="crayon-54512ad68a120970536336" class="crayon-syntax crayon-theme-vs2012 crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-always" style="margin-bottom: 20px; float: left; font-size: 12px !important; line-height: 18px !important; height: auto;">
		
			<div class="crayon-plain-wrap"><textarea wrap="soft" class="crayon-plain print-no" data-settings="dblclick" readonly="" style="tab-size: 4; font-size: 12px !important; line-height: 18px !important; z-index: 0; opacity: 0;">kill 4979</textarea></div>
			<div class="crayon-main" style="position: relative; z-index: 1;">
				<table class="crayon-table" style="margin-left: -19px;">
					<tbody><tr class="crayon-row">
				<td class="crayon-nums " data-settings="hide">
					<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 18px !important;"><div class="crayon-num" data-line="crayon-54512ad68a120970536336-1">1</div></div>
				</td>
						<td class="crayon-code"><div class="crayon-pre" style="font-size: 12px !important; line-height: 18px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><div class="crayon-line" id="crayon-54512ad68a120970536336-1"><span class="crayon-r">kill</span><span class="crayon-h"> </span><span class="crayon-cn">4979</span></div></div></td>
					</tr>
				</tbody></table>
			</div>
		</div>
<!-- [Format Time: 0.0003 seconds] -->
<p></p>
<p class="p1">which just kills the process ID (PID) of MJPG-Streamer.</p>
<h2>View the Webcam Live-stream From a&nbsp;Browser</h2>
<h4>(while connected to your local network)</h4>
<p>Even if you have already <a href="http://www.jacobsalmela.com/raspberry-pi-webserver-using-lighttpd/" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article-int&#39;, &#39;http://www.jacobsalmela.com/raspberry-pi-webserver-using-lighttpd/&#39;, &#39;set up a Webserver&#39;]);" title="Raspberry Pi Webserver Using lighttpd">set up a Webserver</a>, you can still run this without problem because it is accessed on a different (default) port: 
			<span id="crayon-54512ad68a125749555606" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-cn">8080</span></span></span>&nbsp;. &nbsp;So when you navigate to it in a browser, just append 
			<span id="crayon-54512ad68a129201990905" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-o">:</span><span class="crayon-cn">8080</span></span></span>&nbsp;after the IP address:</p>
<ul>
<li><strong>locally</strong>:&nbsp;
			<span id="crayon-54512ad68a12e515174813" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-v">http</span><span class="crayon-o">:</span><span class="crayon-o">/</span><span class="crayon-o">/</span><span class="crayon-v">localhost</span><span class="crayon-o">:</span><span class="crayon-cn">8080</span></span></span></li>
<li><strong>from another device on the network</strong>:&nbsp;
			<span id="crayon-54512ad68a132396427461" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-v">http</span><span class="crayon-o">:</span><span class="crayon-o">/</span><span class="crayon-o">/</span><span class="crayon-o">&lt;</span><span class="crayon-v">raspberry</span><span class="crayon-sy">_</span>pi'<span class="crayon-v">s_ip_address</span><span class="crayon-o">&gt;</span><span class="crayon-o">:</span><span class="crayon-cn">8080</span></span></span></li>
</ul>
<h2><img class="alignnone size-full wp-image-1713" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/catcam.png" alt="catcam" width="844" height="514"></h2>
<h2>Accessing Your&nbsp;Pi Over the Internet</h2>
<p>Viewing your Webcam while connected to&nbsp;your local network is cool, but I’ll show you how to <strong>access your Webcam from anywhere</strong>&nbsp;by going to a URL such as: 
			<span id="crayon-54512ad68a137173417699" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-v">myDomain</span><span class="crayon-e">.com</span><span class="crayon-o">:</span><span class="crayon-cn">8080</span></span></span>&nbsp;. &nbsp;This stream can&nbsp;be <strong>password-protected</strong>, but it really isn’t very secure, so be careful if you make this available online.</p>
<p><a href="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/pioverinternet.png" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article-int&#39;, &#39;http://www.jacobsalmela.com/wp-content/uploads/2014/05/pioverinternet.png&#39;, &#39;&#39;]);"><img class="alignnone size-full wp-image-1716" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/pioverinternet.png" alt="pioverinternet" width="1200" height="350"></a></p>
<h3>Pre-requisites</h3>
<ul>
<li><a href="http://www.jacobsalmela.com/raspberry-pi-and-dynamicdns-how-to-access-a-home-network-from-anywhere/" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article-int&#39;, &#39;http://www.jacobsalmela.com/raspberry-pi-and-dynamicdns-how-to-access-a-home-network-from-anywhere/&#39;, &#39;Forward&#39;]);" title="Raspberry Pi and DynamicDNS: How-to Access a Home Network From Anywhere">Forward</a> port&nbsp;
			<span id="crayon-54512ad68a13c407857177" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-cn">8080</span></span></span>&nbsp;to your Raspberry Pi</li>
<li>Enable a dynamic DNS service on your router</li>
<li>(optional) Setup a&nbsp;<a href="http://www.jacobsalmela.com/raspberry-pi-webserver-using-lighttpd/" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article-int&#39;, &#39;http://www.jacobsalmela.com/raspberry-pi-webserver-using-lighttpd/&#39;, &#39;lighttpd Web server&#39;]);" title="Raspberry Pi Webserver Using lighttpd">lighttpd Web server</a> with a <a href="http://www.jacobsalmela.com/password-protect-a-lighttpd-web-server-on-a-raspberry-pi-using-mod-auth/" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article-int&#39;, &#39;http://www.jacobsalmela.com/password-protect-a-lighttpd-web-server-on-a-raspberry-pi-using-mod-auth/&#39;, &#39;password-protected directory&#39;]);" title="Password-protect A lighttpd Web Server on a Raspberry Pi Using mod_auth">password-protected directory</a></li>
</ul>
<p>Once the steps above are complete, you will be able to access your Webcam stream from any browser by navigating to 
			<span id="crayon-54512ad68a144917304055" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-v">http</span><span class="crayon-o">:</span><span class="crayon-o">/</span><span class="crayon-o">/</span><span class="crayon-v">myDomainName</span><span class="crayon-e">.org</span><span class="crayon-o">:</span><span class="crayon-cn">8080</span></span></span>&nbsp;. &nbsp;But there is no password yet! &nbsp;Anyone on the Internet will be able to see your Webcam.</p>
<p>We can tell&nbsp;MJPG-Streamer to use a password with the 
			<span id="crayon-54512ad68a149191800420" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-o">-</span><span class="crayon-v">c</span></span></span>&nbsp; option. &nbsp;This password is <strong>not very secure </strong>(it is only <a href="http://stackoverflow.com/questions/201479/what-is-base-64-encoding-used-for" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article&#39;, &#39;http://stackoverflow.com/questions/201479/what-is-base-64-encoding-used-for&#39;, &#39;base 64&#39;]);" target="_blank">base 64</a> encoded), but it can offer a first line of defense. &nbsp; Someone could easily sniff and decode the password, but if you are on a trusted network then it is not as much of a problem.</p>
<p>The command would look like this:</p><!-- Crayon Syntax Highlighter v2.6.8 -->

		<div id="crayon-54512ad68a14e454244304" class="crayon-syntax crayon-theme-vs2012 crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-always" style="margin-bottom: 20px; float: left; font-size: 12px !important; line-height: 18px !important; height: auto;">
		
			<div class="crayon-plain-wrap"><textarea wrap="soft" class="crayon-plain print-no" data-settings="dblclick" readonly="" style="tab-size: 4; font-size: 12px !important; line-height: 18px !important; z-index: 0; opacity: 0;">mjpg_streamer -i "/usr/local/lib/input_uvc.so" -o "/usr/local/lib/output_http.so -w /usr/local/www -c username:password"</textarea></div>
			<div class="crayon-main" style="position: relative; z-index: 1;">
				<table class="crayon-table" style="margin-left: -19px;">
					<tbody><tr class="crayon-row">
				<td class="crayon-nums " data-settings="hide">
					<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 18px !important;"><div class="crayon-num" data-line="crayon-54512ad68a14e454244304-1">1</div></div>
				</td>
						<td class="crayon-code"><div class="crayon-pre" style="font-size: 12px !important; line-height: 18px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><div class="crayon-line" id="crayon-54512ad68a14e454244304-1"><span class="crayon-v">mjpg_streamer</span><span class="crayon-h"> </span><span class="crayon-o">-</span><span class="crayon-i">i</span><span class="crayon-h"> </span><span class="crayon-s">"/usr/local/lib/input_uvc.so"</span><span class="crayon-h"> </span><span class="crayon-o">-</span><span class="crayon-i">o</span><span class="crayon-h"> </span><span class="crayon-s">"/usr/local/lib/output_http.so -w /usr/local/www -c username:password"</span></div></div></td>
					</tr>
				</tbody></table>
			</div>
		</div>
<!-- [Format Time: 0.0005 seconds] -->
<p>The best way to secure <em>any</em> online resource is with a<strong> layered-defense model</strong>. &nbsp; So before you would want this out on the Internet, you might&nbsp;want to be protected using other&nbsp;tools.</p>
<h2>Embed the Stream into a Web Page</h2>
<p>For simplicity, just make the page in the same directory that is serving up the HTML files (
			<span id="crayon-54512ad68a153943150245" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-o">/</span><span class="crayon-v">usr</span><span class="crayon-o">/</span><span class="crayon-v">local</span><span class="crayon-o">/</span><span class="crayon-v">www</span><span class="crayon-o">/</span></span></span>&nbsp; in this walkthrough). &nbsp;This makes it easier to make sure the page works. &nbsp;After you know its working, you can move it somewhere else, but you will just need to adjust the paths. &nbsp;Enter the following HTML code (adjusting to your setup) and it is ready to go.</p><!-- Crayon Syntax Highlighter v2.6.8 -->

		<div id="crayon-54512ad68a158444350570" class="crayon-syntax crayon-theme-vs2012 crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-always" style="margin-bottom: 20px; float: left; font-size: 12px !important; line-height: 18px !important; height: auto;">
		
			<div class="crayon-plain-wrap"><textarea wrap="soft" class="crayon-plain print-no" data-settings="dblclick" readonly="" style="tab-size: 4; font-size: 12px !important; line-height: 18px !important; z-index: 0; opacity: 0;">&lt;html&gt;
   &lt;head&gt;&lt;title&gt;Kitty-cam Live-stream&lt;/title&gt;&lt;/head&gt;
   &lt;body&gt;
      &lt;center&gt;&lt;h1&gt;Meow&lt;/h1&gt;&lt;/center&gt;
        &lt;center&gt;
      &lt;img src="/?action=stream" /&gt;
        &lt;/center&gt;
 &lt;body&gt;
&lt;/html&gt;</textarea></div>
			<div class="crayon-main" style="position: relative; z-index: 1;">
				<table class="crayon-table" style="margin-left: -19px;">
					<tbody><tr class="crayon-row">
				<td class="crayon-nums " data-settings="hide">
					<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 18px !important;"><div class="crayon-num" data-line="crayon-54512ad68a158444350570-1">1</div><div class="crayon-num" data-line="crayon-54512ad68a158444350570-2">2</div><div class="crayon-num" data-line="crayon-54512ad68a158444350570-3">3</div><div class="crayon-num" data-line="crayon-54512ad68a158444350570-4">4</div><div class="crayon-num" data-line="crayon-54512ad68a158444350570-5">5</div><div class="crayon-num" data-line="crayon-54512ad68a158444350570-6">6</div><div class="crayon-num" data-line="crayon-54512ad68a158444350570-7">7</div><div class="crayon-num" data-line="crayon-54512ad68a158444350570-8">8</div><div class="crayon-num" data-line="crayon-54512ad68a158444350570-9">9</div></div>
				</td>
						<td class="crayon-code"><div class="crayon-pre" style="font-size: 12px !important; line-height: 18px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><div class="crayon-line" id="crayon-54512ad68a158444350570-1"><span class="crayon-r ">&lt;html&gt;</span></div><div class="crayon-line" id="crayon-54512ad68a158444350570-2"><span class="crayon-i ">&nbsp;&nbsp; </span><span class="crayon-r ">&lt;head&gt;</span><span class="crayon-r ">&lt;title&gt;</span><span class="crayon-i ">Kitty-cam Live-stream</span><span class="crayon-r ">&lt;/title&gt;</span><span class="crayon-r ">&lt;/head&gt;</span></div><div class="crayon-line" id="crayon-54512ad68a158444350570-3"><span class="crayon-i ">&nbsp;&nbsp; </span><span class="crayon-r ">&lt;body&gt;</span></div><div class="crayon-line" id="crayon-54512ad68a158444350570-4"><span class="crayon-i ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-r ">&lt;center&gt;</span><span class="crayon-r ">&lt;h1&gt;</span><span class="crayon-i ">Meow</span><span class="crayon-r ">&lt;/h1&gt;</span><span class="crayon-r ">&lt;/center&gt;</span></div><div class="crayon-line" id="crayon-54512ad68a158444350570-5"><span class="crayon-i ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-r ">&lt;center&gt;</span></div><div class="crayon-line" id="crayon-54512ad68a158444350570-6"><span class="crayon-i ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-r ">&lt;img </span><span class="crayon-e ">src</span><span class="crayon-o">=</span><span class="crayon-s ">"/?action=stream"</span><span class="crayon-r "> /&gt;</span></div><div class="crayon-line" id="crayon-54512ad68a158444350570-7"><span class="crayon-i ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-r ">&lt;/center&gt;</span></div><div class="crayon-line" id="crayon-54512ad68a158444350570-8"><span class="crayon-i "> </span><span class="crayon-r ">&lt;body&gt;</span></div><div class="crayon-line" id="crayon-54512ad68a158444350570-9"><span class="crayon-r ">&lt;/html&gt;</span></div></div></td>
					</tr>
				</tbody></table>
			</div>
		</div>
<!-- [Format Time: 0.0009 seconds] -->
<p>If you want, you can also use lighttpd to <a href="http://www.jacobsalmela.com/password-protect-a-lighttpd-web-server-on-a-raspberry-pi-using-mod-auth/" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article-int&#39;, &#39;http://www.jacobsalmela.com/password-protect-a-lighttpd-web-server-on-a-raspberry-pi-using-mod-auth/&#39;, &#39;password-protect&#39;]);" title="Password-protect A lighttpd Web Server on a Raspberry Pi Using mod_auth">password-protect</a> your embedded-stream.</p>
<h2>Now, just navigate to your page to see it:</h2>
<ul>
<li>
			<span id="crayon-54512ad68a15d943511599" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-v">http</span><span class="crayon-o">:</span><span class="crayon-o">/</span><span class="crayon-o">/</span><span class="crayon-cn">192.168.1.100</span><span class="crayon-o">:</span><span class="crayon-cn">8080</span><span class="crayon-o">/</span><span class="crayon-v">catcam</span><span class="crayon-e">.html</span></span></span>&nbsp;(on the local network)</li>
<li>
			<span id="crayon-54512ad68a161510138848" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-v">http</span><span class="crayon-o">:</span><span class="crayon-o">/</span><span class="crayon-o">/</span><span class="crayon-v">myDomainName</span><span class="crayon-e">.org</span><span class="crayon-o">:</span><span class="crayon-cn">8080</span><span class="crayon-o">/</span><span class="crayon-v">catcam</span><span class="crayon-e">.html</span></span></span>&nbsp;&nbsp;(over the Internet)</li>
</ul>
<h2></h2>
<h2>Run MJPG-Streamer as a Daemon (Background Service)</h2>
<p>Until now, we have just been launching MJPG-Streamer on an as-needed basis by running a command with our options. &nbsp;If you want to make this more permanent and have the Raspberry Pi start the Webcam stream when it boots&nbsp;up, we need to tell it to do so.</p>
<p>There are two scripts below: a very basic one that just runs the command, and an advanced script that&nbsp;will allow you to use the 
			<span id="crayon-54512ad68a167902288746" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-v">service</span></span></span>&nbsp;&nbsp;command to control it:</p><!-- Crayon Syntax Highlighter v2.6.8 -->

		<div id="crayon-54512ad68a16d973712308" class="crayon-syntax crayon-theme-vs2012 crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-always" style="margin-bottom: 20px; float: left; font-size: 12px !important; line-height: 18px !important; height: auto;">
		
			<div class="crayon-plain-wrap"><textarea wrap="soft" class="crayon-plain print-no" data-settings="dblclick" readonly="" style="tab-size: 4; font-size: 12px !important; line-height: 18px !important; z-index: 0; opacity: 0;">sudo service livestream.sh start
sudo service livestream.sh&nbsp;stop
sudo service livestream.sh restart</textarea></div>
			<div class="crayon-main" style="position: relative; z-index: 1;">
				<table class="crayon-table" style="margin-left: -19px;">
					<tbody><tr class="crayon-row">
				<td class="crayon-nums " data-settings="hide">
					<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 18px !important;"><div class="crayon-num" data-line="crayon-54512ad68a16d973712308-1">1</div><div class="crayon-num" data-line="crayon-54512ad68a16d973712308-2">2</div><div class="crayon-num" data-line="crayon-54512ad68a16d973712308-3">3</div></div>
				</td>
						<td class="crayon-code"><div class="crayon-pre" style="font-size: 12px !important; line-height: 18px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><div class="crayon-line" id="crayon-54512ad68a16d973712308-1"><span class="crayon-e">sudo </span><span class="crayon-e">service </span><span class="crayon-v">livestream</span><span class="crayon-e">.sh</span><span class="crayon-h"> </span><span class="crayon-e">start</span></div><div class="crayon-line" id="crayon-54512ad68a16d973712308-2"><span class="crayon-e">sudo </span><span class="crayon-e">service </span><span class="crayon-v">livestream</span><span class="crayon-e">.sh</span>&nbsp;<span class="crayon-e">stop</span></div><div class="crayon-line" id="crayon-54512ad68a16d973712308-3"><span class="crayon-e">sudo </span><span class="crayon-e">service </span><span class="crayon-v">livestream</span><span class="crayon-e">.sh</span><span class="crayon-h"> </span><span class="crayon-v">restart</span></div></div></td>
					</tr>
				</tbody></table>
			</div>
		</div>
<!-- [Format Time: 0.0006 seconds] -->
<p></p>
<h3>Simple Script</h3>
<p>A very simple script to do this is below:</p><!-- Crayon Syntax Highlighter v2.6.8 -->

		<div id="crayon-54512ad68a172003109751" class="crayon-syntax crayon-theme-vs2012 crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-always" style="margin-bottom: 20px; float: left; font-size: 12px !important; line-height: 18px !important; height: auto;">
		
			<div class="crayon-plain-wrap"><textarea wrap="soft" class="crayon-plain print-no" data-settings="dblclick" readonly="" style="tab-size: 4; font-size: 12px !important; line-height: 18px !important; z-index: 0; opacity: 0;">sudo vi /etc/init.d/livestream.sh</textarea></div>
			<div class="crayon-main" style="position: relative; z-index: 1;">
				<table class="crayon-table" style="margin-left: -19px;">
					<tbody><tr class="crayon-row">
				<td class="crayon-nums " data-settings="hide">
					<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 18px !important;"><div class="crayon-num" data-line="crayon-54512ad68a172003109751-1">1</div></div>
				</td>
						<td class="crayon-code"><div class="crayon-pre" style="font-size: 12px !important; line-height: 18px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><div class="crayon-line" id="crayon-54512ad68a172003109751-1"><span class="crayon-e">sudo </span><span class="crayon-r">vi</span><span class="crayon-h"> </span><span class="crayon-o">/</span><span class="crayon-v">etc</span><span class="crayon-o">/</span><span class="crayon-v">init</span><span class="crayon-e">.d</span><span class="crayon-o">/</span><span class="crayon-v">livestream</span><span class="crayon-e">.sh</span></div></div></td>
					</tr>
				</tbody></table>
			</div>
		</div>
<!-- [Format Time: 0.0006 seconds] -->
<p></p><!-- Crayon Syntax Highlighter v2.6.8 -->

		<div id="crayon-54512ad68a177969607321" class="crayon-syntax crayon-theme-vs2012 crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-always" style="margin-bottom: 20px; float: left; font-size: 12px !important; line-height: 18px !important; height: auto;">
		
			<div class="crayon-plain-wrap"><textarea wrap="soft" class="crayon-plain print-no" data-settings="dblclick" readonly="" style="tab-size: 4; font-size: 12px !important; line-height: 18px !important; z-index: 0; opacity: 0;">#!/bin/bash
mjpg_streamer -i "/usr/local/lib/input_uvc.so" -o "/usr/local/lib/output_http.so -w /usr/local/www -c username:password"</textarea></div>
			<div class="crayon-main" style="position: relative; z-index: 1;">
				<table class="crayon-table" style="margin-left: -19px;">
					<tbody><tr class="crayon-row">
				<td class="crayon-nums " data-settings="hide">
					<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 18px !important;"><div class="crayon-num" data-line="crayon-54512ad68a177969607321-1">1</div><div class="crayon-num" data-line="crayon-54512ad68a177969607321-2">2</div></div>
				</td>
						<td class="crayon-code"><div class="crayon-pre" style="font-size: 12px !important; line-height: 18px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><div class="crayon-line" id="crayon-54512ad68a177969607321-1"><span class="crayon-p">#!/bin/bash</span></div><div class="crayon-line" id="crayon-54512ad68a177969607321-2"><span class="crayon-v">mjpg_streamer</span><span class="crayon-h"> </span><span class="crayon-o">-</span><span class="crayon-i">i</span><span class="crayon-h"> </span><span class="crayon-s">"/usr/local/lib/input_uvc.so"</span><span class="crayon-h"> </span><span class="crayon-o">-</span><span class="crayon-i">o</span><span class="crayon-h"> </span><span class="crayon-s">"/usr/local/lib/output_http.so -w /usr/local/www -c username:password"</span></div></div></td>
					</tr>
				</tbody></table>
			</div>
		</div>
<!-- [Format Time: 0.0005 seconds] -->
<p>Save the script. &nbsp;Make it executable:</p><!-- Crayon Syntax Highlighter v2.6.8 -->

		<div id="crayon-54512ad68a17b983135371" class="crayon-syntax crayon-theme-vs2012 crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-always" style="margin-bottom: 20px; float: left; font-size: 12px !important; line-height: 18px !important; height: auto;">
		
			<div class="crayon-plain-wrap"><textarea wrap="soft" class="crayon-plain print-no" data-settings="dblclick" readonly="" style="tab-size: 4; font-size: 12px !important; line-height: 18px !important; z-index: 0; opacity: 0;">sudo chmod 755 /usr/sbin/livestream.sh</textarea></div>
			<div class="crayon-main" style="position: relative; z-index: 1;">
				<table class="crayon-table" style="margin-left: -19px;">
					<tbody><tr class="crayon-row">
				<td class="crayon-nums " data-settings="hide">
					<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 18px !important;"><div class="crayon-num" data-line="crayon-54512ad68a17b983135371-1">1</div></div>
				</td>
						<td class="crayon-code"><div class="crayon-pre" style="font-size: 12px !important; line-height: 18px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><div class="crayon-line" id="crayon-54512ad68a17b983135371-1"><span class="crayon-e">sudo </span><span class="crayon-r">chmod</span><span class="crayon-h"> </span><span class="crayon-cn">755</span><span class="crayon-h"> </span><span class="crayon-o">/</span><span class="crayon-v">usr</span><span class="crayon-o">/</span><span class="crayon-v">sbin</span><span class="crayon-o">/</span><span class="crayon-v">livestream</span><span class="crayon-e">.sh</span></div></div></td>
					</tr>
				</tbody></table>
			</div>
		</div>
<!-- [Format Time: 0.0005 seconds] -->
<p>This next command makes sure it is executed during boot:</p><!-- Crayon Syntax Highlighter v2.6.8 -->

		<div id="crayon-54512ad68a180583104010" class="crayon-syntax crayon-theme-vs2012 crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-always" style="margin-bottom: 20px; float: left; font-size: 12px !important; line-height: 18px !important; height: auto;">
		
			<div class="crayon-plain-wrap"><textarea wrap="soft" class="crayon-plain print-no" data-settings="dblclick" readonly="" style="tab-size: 4; font-size: 12px !important; line-height: 18px !important; z-index: 0; opacity: 0;">sudo update-rc.d livestream.sh defaults</textarea></div>
			<div class="crayon-main" style="position: relative; z-index: 1;">
				<table class="crayon-table" style="margin-left: -19px;">
					<tbody><tr class="crayon-row">
				<td class="crayon-nums " data-settings="hide">
					<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 18px !important;"><div class="crayon-num" data-line="crayon-54512ad68a180583104010-1">1</div></div>
				</td>
						<td class="crayon-code"><div class="crayon-pre" style="font-size: 12px !important; line-height: 18px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><div class="crayon-line" id="crayon-54512ad68a180583104010-1"><span class="crayon-e">sudo </span><span class="crayon-v">update</span><span class="crayon-o">-</span><span class="crayon-v">rc</span><span class="crayon-e">.d</span><span class="crayon-h"> </span><span class="crayon-v">livestream</span><span class="crayon-e">.sh</span><span class="crayon-h"> </span><span class="crayon-v">defaults</span></div></div></td>
					</tr>
				</tbody></table>
			</div>
		</div>
<!-- [Format Time: 0.0005 seconds] -->
<p></p>
<h3>Advanced Script</h3>
<p><span style="line-height: 1.5;">Below is a&nbsp;</span><a href="http://nutz95.wordpress.com/2013/05/14/raspberry-pi-pirider-install-mjpegstreamer/" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article&#39;, &#39;http://nutz95.wordpress.com/2013/05/14/raspberry-pi-pirider-install-mjpegstreamer/&#39;, &#39;script&#39;]);" target="_blank">script</a><span style="line-height: 1.5;">&nbsp;that should load MJPG-Streamer at boot and allow use of the 
			<span id="crayon-54512ad68a185108700874" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-v">service</span></span></span>&nbsp;&nbsp;command:</span></p><!-- Crayon Syntax Highlighter v2.6.8 -->

		<div id="crayon-54512ad68a189150687308" class="crayon-syntax crayon-theme-vs2012 crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-always" style="margin-bottom: 20px; float: left; font-size: 12px !important; line-height: 18px !important; height: auto;">
		
			<div class="crayon-plain-wrap"><textarea wrap="soft" class="crayon-plain print-no" data-settings="dblclick" readonly="" style="tab-size: 4; font-size: 12px !important; line-height: 18px !important; z-index: 0; opacity: 0;">#!/bin/sh
# /etc/init.d/livestream.sh
### BEGIN INIT INFO
# Provides:          livestream.sh
# Required-Start:    $network
# Required-Stop:     $network
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: mjpg_streamer for webcam
# Description:       Streams /dev/video0 to http://IP/?action=stream
### END INIT INFO
f_message(){
        echo "[+] $1"
}

# Carry out specific functions when asked to by the system
case "$1" in
        start)
                f_message "Starting mjpg_streamer"
                mjpg_streamer -b -i "/usr/local/lib/input_uvc.so" -o "/usr/local/lib/output_http.so -w /usr/local/www -c username:password"
                sleep 2
                f_message "mjpg_streamer started"
                ;;
        stop)
                f_message "Stopping mjpg_streamer…"
                killall mjpg_streamer
                f_message "mjpg_streamer stopped"
                ;;
        restart)
                f_message "Restarting daemon: mjpg_streamer"
                killall mjpg_streamer
                mjpg_streamer -b -i "/usr/local/lib/input_uvc.so" -o "/usr/local/lib/output_http.so -w /usr/local/www -c username:password"
                sleep 2
                f_message "Restarted daemon: mjpg_streamer"
                ;;
        status)
                pid=`ps -A | grep mjpg_streamer | grep -v "grep" | grep -v mjpg_streamer. | awk ‘{print $1}’ | head -n 1`
                if [ -n "$pid" ];
                then
                        f_message "mjpg_streamer is running with pid ${pid}"
                        f_message "mjpg_streamer was started with the following command line"
                        cat /proc/${pid}/cmdline ; echo ""
                else
                        f_message "Could not find mjpg_streamer running"
                fi
                ;;
        *)
                f_message "Usage: $0 {start|stop|status|restart}"
                exit 1
                ;;
esac
exit 0</textarea></div>
			<div class="crayon-main" style="position: relative; z-index: 1;">
				<table class="crayon-table" style="margin-left: -26px;">
					<tbody><tr class="crayon-row">
				<td class="crayon-nums " data-settings="hide">
					<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 18px !important;"><div class="crayon-num" data-line="crayon-54512ad68a189150687308-1">1</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-2">2</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-3">3</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-4">4</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-5">5</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-6">6</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-7">7</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-8">8</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-9">9</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-10">10</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-11">11</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-12">12</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-13">13</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-14">14</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-15">15</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-16">16</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-17">17</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-18">18</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-19">19</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-20">20</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-21">21</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-22">22</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-23">23</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-24">24</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-25">25</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-26">26</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-27">27</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-28">28</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-29">29</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-30">30</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-31">31</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-32">32</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-33">33</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-34">34</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-35">35</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-36">36</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-37">37</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-38">38</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-39">39</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-40">40</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-41">41</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-42">42</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-43">43</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-44">44</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-45">45</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-46">46</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-47">47</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-48">48</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-49">49</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-50">50</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-51">51</div><div class="crayon-num" data-line="crayon-54512ad68a189150687308-52">52</div></div>
				</td>
						<td class="crayon-code"><div class="crayon-pre" style="font-size: 12px !important; line-height: 18px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><div class="crayon-line" id="crayon-54512ad68a189150687308-1"><span class="crayon-p">#!/bin/sh</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-2"><span class="crayon-c"># /etc/init.d/livestream.sh</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-3"><span class="crayon-c">### BEGIN INIT INFO</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-4"><span class="crayon-c"># Provides:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;livestream.sh</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-5"><span class="crayon-c"># Required-Start:&nbsp;&nbsp;&nbsp;&nbsp;$network</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-6"><span class="crayon-c"># Required-Stop:&nbsp;&nbsp;&nbsp;&nbsp; $network</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-7"><span class="crayon-c"># Default-Start:&nbsp;&nbsp;&nbsp;&nbsp; 2 3 4 5</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-8"><span class="crayon-c"># Default-Stop:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 1 6</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-9"><span class="crayon-c"># Short-Description: mjpg_streamer for webcam</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-10"><span class="crayon-c"># Description:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Streams /dev/video0 to http://IP/?action=stream</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-11"><span class="crayon-c">### END INIT INFO</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-12"><span class="crayon-e">f_message</span><span class="crayon-sy">(</span><span class="crayon-sy">)</span><span class="crayon-sy">{</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-13"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-r">echo</span><span class="crayon-h"> </span><span class="crayon-s">"[+] $1"</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-14"><span class="crayon-sy">}</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-15">&nbsp;</div><div class="crayon-line" id="crayon-54512ad68a189150687308-16"><span class="crayon-c"># Carry out specific functions when asked to by the system</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-17"><span class="crayon-st">case</span><span class="crayon-h"> </span><span class="crayon-s">"$1"</span><span class="crayon-h"> </span><span class="crayon-st">in</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-18"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-v">start</span><span class="crayon-sy">)</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-19"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-v">f</span><span class="crayon-sy">_</span>message<span class="crayon-h"> </span><span class="crayon-s">"Starting mjpg_streamer"</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-20"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-v">mjpg_streamer</span><span class="crayon-h"> </span><span class="crayon-o">-</span><span class="crayon-v">b</span><span class="crayon-h"> </span><span class="crayon-o">-</span><span class="crayon-i">i</span><span class="crayon-h"> </span><span class="crayon-s">"/usr/local/lib/input_uvc.so"</span><span class="crayon-h"> </span><span class="crayon-o">-</span><span class="crayon-i">o</span><span class="crayon-h"> </span><span class="crayon-s">"/usr/local/lib/output_http.so -w /usr/local/www -c username:password"</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-21"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-r">sleep</span><span class="crayon-h"> </span><span class="crayon-cn">2</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-22"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-v">f</span><span class="crayon-sy">_</span>message<span class="crayon-h"> </span><span class="crayon-s">"mjpg_streamer started"</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-23"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-sy">;</span><span class="crayon-sy">;</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-24"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-v">stop</span><span class="crayon-sy">)</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-25"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-v">f</span><span class="crayon-sy">_</span>message<span class="crayon-h"> </span><span class="crayon-s">"Stopping mjpg_streamer…"</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-26"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-e">killall </span><span class="crayon-e">mjpg_streamer</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-27"><span class="crayon-e">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-v">f</span><span class="crayon-sy">_</span>message<span class="crayon-h"> </span><span class="crayon-s">"mjpg_streamer stopped"</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-28"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-sy">;</span><span class="crayon-sy">;</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-29"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-v">restart</span><span class="crayon-sy">)</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-30"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-v">f</span><span class="crayon-sy">_</span>message<span class="crayon-h"> </span><span class="crayon-s">"Restarting daemon: mjpg_streamer"</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-31"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-e">killall </span><span class="crayon-e">mjpg_streamer</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-32"><span class="crayon-e">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-v">mjpg_streamer</span><span class="crayon-h"> </span><span class="crayon-o">-</span><span class="crayon-v">b</span><span class="crayon-h"> </span><span class="crayon-o">-</span><span class="crayon-i">i</span><span class="crayon-h"> </span><span class="crayon-s">"/usr/local/lib/input_uvc.so"</span><span class="crayon-h"> </span><span class="crayon-o">-</span><span class="crayon-i">o</span><span class="crayon-h"> </span><span class="crayon-s">"/usr/local/lib/output_http.so -w /usr/local/www -c username:password"</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-33"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-r">sleep</span><span class="crayon-h"> </span><span class="crayon-cn">2</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-34"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-v">f</span><span class="crayon-sy">_</span>message<span class="crayon-h"> </span><span class="crayon-s">"Restarted daemon: mjpg_streamer"</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-35"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-sy">;</span><span class="crayon-sy">;</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-36"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-v">status</span><span class="crayon-sy">)</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-37"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-v">pid</span><span class="crayon-o">=</span><span class="crayon-sy">`</span><span class="crayon-r">ps</span><span class="crayon-h"> </span><span class="crayon-o">-</span><span class="crayon-v">A</span><span class="crayon-h"> </span><span class="crayon-o">|</span><span class="crayon-h"> </span><span class="crayon-r">grep</span><span class="crayon-h"> </span><span class="crayon-v">mjpg_streamer</span><span class="crayon-h"> </span><span class="crayon-o">|</span><span class="crayon-h"> </span><span class="crayon-r">grep</span><span class="crayon-h"> </span><span class="crayon-o">-</span><span class="crayon-i">v</span><span class="crayon-h"> </span><span class="crayon-s">"grep"</span><span class="crayon-h"> </span><span class="crayon-o">|</span><span class="crayon-h"> </span><span class="crayon-r">grep</span><span class="crayon-h"> </span><span class="crayon-o">-</span><span class="crayon-i">v</span><span class="crayon-h"> </span><span class="crayon-v">mjpg_streamer</span><span class="crayon-sy">.</span><span class="crayon-h"> </span><span class="crayon-o">|</span><span class="crayon-h"> </span><span class="crayon-r">awk</span><span class="crayon-h"> </span>‘<span class="crayon-sy">{</span><span class="crayon-i">print</span><span class="crayon-h"> </span><span class="crayon-sy">$</span><span class="crayon-cn">1</span><span class="crayon-sy">}</span>’<span class="crayon-h"> </span><span class="crayon-o">|</span><span class="crayon-h"> </span><span class="crayon-r">head</span><span class="crayon-h"> </span><span class="crayon-o">-</span><span class="crayon-i">n</span><span class="crayon-h"> </span><span class="crayon-cn">1</span><span class="crayon-sy">`</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-38"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-st">if</span><span class="crayon-h"> </span><span class="crayon-sy">[</span><span class="crayon-h"> </span><span class="crayon-o">-</span><span class="crayon-i">n</span><span class="crayon-h"> </span><span class="crayon-s">"$pid"</span><span class="crayon-h"> </span><span class="crayon-sy">]</span><span class="crayon-sy">;</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-39"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-st">then</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-40"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-v">f</span><span class="crayon-sy">_</span>message<span class="crayon-h"> </span><span class="crayon-s">"mjpg_streamer is running with pid ${pid}"</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-41"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-v">f</span><span class="crayon-sy">_</span>message<span class="crayon-h"> </span><span class="crayon-s">"mjpg_streamer was started with the following command line"</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-42"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-r">cat</span><span class="crayon-h"> </span><span class="crayon-o">/</span><span class="crayon-e">proc</span><span class="crayon-o">/</span><span class="crayon-sy">$</span><span class="crayon-sy">{</span><span class="crayon-v">pid</span><span class="crayon-sy">}</span><span class="crayon-o">/</span><span class="crayon-i">cmdline</span><span class="crayon-h"> </span><span class="crayon-sy">;</span><span class="crayon-h"> </span><span class="crayon-r">echo</span><span class="crayon-h"> </span><span class="crayon-s">""</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-43"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-st">else</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-44"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-v">f</span><span class="crayon-sy">_</span>message<span class="crayon-h"> </span><span class="crayon-s">"Could not find mjpg_streamer running"</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-45"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-st">fi</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-46"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-sy">;</span><span class="crayon-sy">;</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-47"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-o">*</span><span class="crayon-sy">)</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-48"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-v">f</span><span class="crayon-sy">_</span>message<span class="crayon-h"> </span><span class="crayon-s">"Usage: $0 {start|stop|status|restart}"</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-49"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-r">exit</span><span class="crayon-h"> </span><span class="crayon-cn">1</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-50"><span class="crayon-h">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="crayon-sy">;</span><span class="crayon-sy">;</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-51"><span class="crayon-st">esac</span></div><div class="crayon-line" id="crayon-54512ad68a189150687308-52"><span class="crayon-r">exit</span><span class="crayon-h"> </span><span class="crayon-cn">0</span></div></div></td>
					</tr>
				</tbody></table>
			</div>
		</div>
<!-- [Format Time: 0.0085 seconds] -->
<p>Once saved, run the same commands as above:</p><!-- Crayon Syntax Highlighter v2.6.8 -->

		<div id="crayon-54512ad68a190841206235" class="crayon-syntax crayon-theme-vs2012 crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-always" style="margin-bottom: 20px; float: left; font-size: 12px !important; line-height: 18px !important; height: auto;">
		
			<div class="crayon-plain-wrap"><textarea wrap="soft" class="crayon-plain print-no" data-settings="dblclick" readonly="" style="tab-size: 4; font-size: 12px !important; line-height: 18px !important; z-index: 0; opacity: 0;">sudo chmod 755 /etc/init.d/livestream.sh
sudo update-rc.d livestream.sh defaults</textarea></div>
			<div class="crayon-main" style="position: relative; z-index: 1;">
				<table class="crayon-table" style="margin-left: -19px;">
					<tbody><tr class="crayon-row">
				<td class="crayon-nums " data-settings="hide">
					<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 18px !important;"><div class="crayon-num" data-line="crayon-54512ad68a190841206235-1">1</div><div class="crayon-num" data-line="crayon-54512ad68a190841206235-2">2</div></div>
				</td>
						<td class="crayon-code"><div class="crayon-pre" style="font-size: 12px !important; line-height: 18px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><div class="crayon-line" id="crayon-54512ad68a190841206235-1"><span class="crayon-e">sudo </span><span class="crayon-r">chmod</span><span class="crayon-h"> </span><span class="crayon-cn">755</span><span class="crayon-h"> </span><span class="crayon-o">/</span><span class="crayon-v">etc</span><span class="crayon-o">/</span><span class="crayon-v">init</span><span class="crayon-e">.d</span><span class="crayon-o">/</span><span class="crayon-v">livestream</span><span class="crayon-e">.sh</span></div><div class="crayon-line" id="crayon-54512ad68a190841206235-2"><span class="crayon-e">sudo </span><span class="crayon-v">update</span><span class="crayon-o">-</span><span class="crayon-v">rc</span><span class="crayon-e">.d</span><span class="crayon-h"> </span><span class="crayon-v">livestream</span><span class="crayon-e">.sh</span><span class="crayon-h"> </span><span class="crayon-v">defaults</span></div></div></td>
					</tr>
				</tbody></table>
			</div>
		</div>
<!-- [Format Time: 0.0009 seconds] -->
<p></p>
<h1>Success!</h1>
<p>Now your Webcam is available over the Internet and starts up when you turn on your Raspberry Pi.</p>
<h1>Appendix:</h1>
<h3>Download MJPG-Streamer via curl or wget</h3>
<p></p><!-- Crayon Syntax Highlighter v2.6.8 -->

		<div id="crayon-54512ad68a195641696828" class="crayon-syntax crayon-theme-vs2012 crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-always" style="margin-bottom: 20px; float: left; font-size: 12px !important; line-height: 18px !important; height: auto;">
		
			<div class="crayon-plain-wrap"><textarea wrap="soft" class="crayon-plain print-no" data-settings="dblclick" readonly="" style="tab-size: 4; font-size: 12px !important; line-height: 18px !important; z-index: 0; opacity: 0;">wget http://sourceforge.net/code-snapshots/svn/m/mj/mjpg-streamer/code/mjpg-streamer-code-182.zip
unzip mjpg-streamer-code-182.zip</textarea></div>
			<div class="crayon-main" style="position: relative; z-index: 1;">
				<table class="crayon-table" style="margin-left: -19px;">
					<tbody><tr class="crayon-row">
				<td class="crayon-nums " data-settings="hide">
					<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 18px !important;"><div class="crayon-num" data-line="crayon-54512ad68a195641696828-1">1</div><div class="crayon-num" data-line="crayon-54512ad68a195641696828-2">2</div></div>
				</td>
						<td class="crayon-code"><div class="crayon-pre" style="font-size: 12px !important; line-height: 18px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><div class="crayon-line" id="crayon-54512ad68a195641696828-1"><span class="crayon-e">wget </span><span class="crayon-v">http</span><span class="crayon-o">:</span><span class="crayon-o">/</span><span class="crayon-o">/</span><span class="crayon-v">sourceforge</span><span class="crayon-e">.net</span><span class="crayon-o">/</span><span class="crayon-v">code</span><span class="crayon-o">-</span><span class="crayon-v">snapshots</span><span class="crayon-o">/</span><span class="crayon-v">svn</span><span class="crayon-o">/</span><span class="crayon-v">m</span><span class="crayon-o">/</span><span class="crayon-v">mj</span><span class="crayon-o">/</span><span class="crayon-v">mjpg</span><span class="crayon-o">-</span><span class="crayon-v">streamer</span><span class="crayon-o">/</span><span class="crayon-v">code</span><span class="crayon-o">/</span><span class="crayon-v">mjpg</span><span class="crayon-o">-</span><span class="crayon-v">streamer</span><span class="crayon-o">-</span><span class="crayon-v">code</span><span class="crayon-o">-</span><span class="crayon-cn">182.zip</span></div><div class="crayon-line" id="crayon-54512ad68a195641696828-2"><span class="crayon-e">unzip </span><span class="crayon-v">mjpg</span><span class="crayon-o">-</span><span class="crayon-v">streamer</span><span class="crayon-o">-</span><span class="crayon-v">code</span><span class="crayon-o">-</span><span class="crayon-cn">182.zip</span></div></div></td>
					</tr>
				</tbody></table>
			</div>
		</div>
<!-- [Format Time: 0.0013 seconds] -->
<p>Finish running the commands from the <strong>Via subversion</strong> section.</p>
<h3>Download MJPG-Streamer via&nbsp;scp</h3>
<p>Download MJPG-Streamer on another device and then use scp to copy it over to the Raspberry Pi.</p><!-- Crayon Syntax Highlighter v2.6.8 -->

		<div id="crayon-54512ad68a19c031003785" class="crayon-syntax crayon-theme-vs2012 crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-always" style="margin-bottom: 20px; float: left; font-size: 12px !important; line-height: 18px !important; height: auto;">
		
			<div class="crayon-plain-wrap"><textarea wrap="soft" class="crayon-plain print-no" data-settings="dblclick" readonly="" style="tab-size: 4; font-size: 12px !important; line-height: 18px !important; z-index: 0; opacity: 0;">scp ~/Downloads/ pi@192.168.1.100:~/</textarea></div>
			<div class="crayon-main" style="position: relative; z-index: 1;">
				<table class="crayon-table" style="margin-left: -19px;">
					<tbody><tr class="crayon-row">
				<td class="crayon-nums " data-settings="hide">
					<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 18px !important;"><div class="crayon-num" data-line="crayon-54512ad68a19c031003785-1">1</div></div>
				</td>
						<td class="crayon-code"><div class="crayon-pre" style="font-size: 12px !important; line-height: 18px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><div class="crayon-line" id="crayon-54512ad68a19c031003785-1"><span class="crayon-v">scp</span><span class="crayon-h"> </span><span class="crayon-o">~</span><span class="crayon-o">/</span><span class="crayon-v">Downloads</span><span class="crayon-o">/</span><span class="crayon-h"> </span><span class="crayon-v">pi</span><span class="crayon-sy">@</span><span class="crayon-cn">192.168.1.100</span><span class="crayon-o">:</span><span class="crayon-o">~</span><span class="crayon-o">/</span></div></div></td>
					</tr>
				</tbody></table>
			</div>
		</div>
<!-- [Format Time: 0.0005 seconds] -->
<p>Finish running the commands from the <strong>Via subversion</strong> section.</p>
<h2>Using input_file.so to Capture Images</h2>
<p>For this method, you need to set the camera to start recording images using the command 
			<span id="crayon-54512ad68a1a1488168942" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-v">raspistill</span></span></span>&nbsp;. &nbsp;You will also need a folder to store the files in; for now, just make it in 
			<span id="crayon-54512ad68a1a5736537657" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-o">/</span><span class="crayon-v">tmp</span></span></span>&nbsp;:</p><!-- Crayon Syntax Highlighter v2.6.8 -->

		<div id="crayon-54512ad68a1aa673032659" class="crayon-syntax crayon-theme-vs2012 crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-always" style="margin-bottom: 20px; float: left; font-size: 12px !important; line-height: 18px !important; height: auto;">
		
			<div class="crayon-plain-wrap"><textarea wrap="soft" class="crayon-plain print-no" data-settings="dblclick" readonly="" style="tab-size: 4; font-size: 12px !important; line-height: 18px !important; z-index: 0; opacity: 0;">mkdir /tmp/stream</textarea></div>
			<div class="crayon-main" style="position: relative; z-index: 1;">
				<table class="crayon-table" style="margin-left: -19px;">
					<tbody><tr class="crayon-row">
				<td class="crayon-nums " data-settings="hide">
					<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 18px !important;"><div class="crayon-num" data-line="crayon-54512ad68a1aa673032659-1">1</div></div>
				</td>
						<td class="crayon-code"><div class="crayon-pre" style="font-size: 12px !important; line-height: 18px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><div class="crayon-line" id="crayon-54512ad68a1aa673032659-1"><span class="crayon-r">mkdir</span><span class="crayon-h"> </span><span class="crayon-o">/</span><span class="crayon-v">tmp</span><span class="crayon-o">/</span><span class="crayon-v">stream</span></div></div></td>
					</tr>
				</tbody></table>
			</div>
		</div>
<!-- [Format Time: 0.0003 seconds] -->
<p>Then, enable the camera with a command similar to the following:</p><!-- Crayon Syntax Highlighter v2.6.8 -->

		<div id="crayon-54512ad68a1ae614832513" class="crayon-syntax crayon-theme-vs2012 crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-always" style="margin-bottom: 20px; float: left; font-size: 12px !important; line-height: 18px !important; height: auto;">
		
			<div class="crayon-plain-wrap"><textarea wrap="soft" class="crayon-plain print-no" data-settings="dblclick" readonly="" style="tab-size: 4; font-size: 12px !important; line-height: 18px !important; z-index: 0; opacity: 0;">raspistill --nopreview -w 640 -h 480- q 5 -o /tmp/stream/pic.jpg -tl 100 -t 9999999 -th 0:0:0 &amp;</textarea></div>
			<div class="crayon-main" style="position: relative; z-index: 1;">
				<table class="crayon-table" style="margin-left: -19px;">
					<tbody><tr class="crayon-row">
				<td class="crayon-nums " data-settings="hide">
					<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 18px !important;"><div class="crayon-num" data-line="crayon-54512ad68a1ae614832513-1">1</div></div>
				</td>
						<td class="crayon-code"><div class="crayon-pre" style="font-size: 12px !important; line-height: 18px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><div class="crayon-line" id="crayon-54512ad68a1ae614832513-1"><span class="crayon-v">raspistill</span><span class="crayon-h"> </span><span class="crayon-o">--</span><span class="crayon-v">nopreview</span><span class="crayon-h"> </span><span class="crayon-o">-</span><span class="crayon-i">w</span><span class="crayon-h"> </span><span class="crayon-cn">640</span><span class="crayon-h"> </span><span class="crayon-o">-</span><span class="crayon-i">h</span><span class="crayon-h"> </span><span class="crayon-cn">480</span><span class="crayon-o">-</span><span class="crayon-h"> </span><span class="crayon-i">q</span><span class="crayon-h"> </span><span class="crayon-cn">5</span><span class="crayon-h"> </span><span class="crayon-o">-</span><span class="crayon-v">o</span><span class="crayon-h"> </span><span class="crayon-o">/</span><span class="crayon-v">tmp</span><span class="crayon-o">/</span><span class="crayon-v">stream</span><span class="crayon-o">/</span><span class="crayon-v">pic</span><span class="crayon-e">.jpg</span><span class="crayon-h"> </span><span class="crayon-o">-</span><span class="crayon-i">tl</span><span class="crayon-h"> </span><span class="crayon-cn">100</span><span class="crayon-h"> </span><span class="crayon-o">-</span><span class="crayon-i">t</span><span class="crayon-h"> </span><span class="crayon-cn">9999999</span><span class="crayon-h"> </span><span class="crayon-o">-</span><span class="crayon-i">th</span><span class="crayon-h"> </span><span class="crayon-cn">0</span><span class="crayon-o">:</span><span class="crayon-cn">0</span><span class="crayon-o">:</span><span class="crayon-cn">0</span><span class="crayon-h"> </span><span class="crayon-o">&amp;</span></div></div></td>
					</tr>
				</tbody></table>
			</div>
		</div>
<!-- [Format Time: 0.0014 seconds] -->
<p>The options of the command are explained below, so adjust them as you see fit:</p>
<ul>
<li>
			<span id="crayon-54512ad68a1b3067724130" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-o">--</span><span class="crayon-v">nopreview</span></span></span>&nbsp;:&nbsp;Do not display a preview window</li>
<li>
			<span id="crayon-54512ad68a1b7908303867" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-o">-</span><span class="crayon-i">w</span><span class="crayon-h"> </span><span class="crayon-st">and</span><span class="crayon-h"> </span><span class="crayon-o">-</span><span class="crayon-v">h</span></span></span>&nbsp;: image with and height (in pixels)</li>
<li>
			<span id="crayon-54512ad68a1bc352320285" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-o">-</span><span class="crayon-v">q</span></span></span>&nbsp;: quality &lt;1-100&gt;</li>
<li>
			<span id="crayon-54512ad68a1c0373884795" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-o">-</span><span class="crayon-v">o</span></span></span>&nbsp;: write out to a file (named pic.jpg)</li>
<li>
			<span id="crayon-54512ad68a1c5334752194" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-o">-</span><span class="crayon-v">tl</span></span></span>&nbsp;: time (in ms) before it takes a picture and shuts down and link latest complete image to filename</li>
<li>
			<span id="crayon-54512ad68a1c9882925305" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-o">-</span><span class="crayon-v">t</span></span></span>&nbsp;: time (9999999ms)</li>
<li>
			<span id="crayon-54512ad68a1ce523058618" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-o">-</span><span class="crayon-v">th</span></span></span>&nbsp;: set thumbnail parameters (x:y:quality)</li>
<li>
			<span id="crayon-54512ad68a1d2905552956" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-o">&amp;</span></span></span>&nbsp;: sends the job to the background (not part of 
			<span id="crayon-54512ad68a1d7224252254" class="crayon-syntax crayon-syntax-inline  crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-monaco" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 18px !important;font-size: 12px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;"><span class="crayon-v">raspistill</span></span></span>&nbsp;)</li>
</ul>
<div class="sharedaddy sd-sharing-enabled"><div class="robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing"><h3 class="sd-title">Share this:</h3><div class="sd-content"><ul><li class="share-print"><a href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/#print" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article-int&#39;, &#39;http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/#print&#39;, &#39;Print&#39;]);" rel="nofollow" class="share-print sd-button share-icon" title="Click to print"><span>Print</span></a></li><li class="share-email share-service-visible"><a href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?share=email&nb=1" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article-int&#39;, &#39;http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?share=email&#39;, &#39;Email&#39;]);" rel="nofollow" class="share-email sd-button share-icon" title="Click to email this to a friend"><span>Email</span></a></li><li class="share-pocket"><a href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?share=pocket&nb=1" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article-int&#39;, &#39;http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?share=pocket&#39;, &#39;Pocket&#39;]);" rel="nofollow" class="share-pocket sd-button share-icon" title="Click to share on Pocket"><span>Pocket</span></a></li><li class="share-twitter"><a href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?share=twitter&nb=1" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article-int&#39;, &#39;http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?share=twitter&#39;, &#39;Twitter&#39;]);" rel="nofollow" class="share-twitter sd-button share-icon" title="Click to share on Twitter" id="sharing-twitter-1659"><span>Twitter<span class="share-count">2</span></span></a></li><li class="share-facebook"><a href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?share=facebook&nb=1" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article-int&#39;, &#39;http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?share=facebook&#39;, &#39;Facebook&#39;]);" rel="nofollow" class="share-facebook sd-button share-icon" title="Share on Facebook" id="sharing-facebook-1659"><span>Facebook<span class="share-count">15</span></span></a></li><li class="share-google-plus-1"><a href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?share=google-plus-1&nb=1" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article-int&#39;, &#39;http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?share=google-plus-1&#39;, &#39;Google&#39;]);" rel="nofollow" class="share-google-plus-1 sd-button share-icon" title="Click to share on Google+" id="sharing-google-1659"><span>Google</span></a></li><li class="share-reddit"><a href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?share=reddit&nb=1" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article-int&#39;, &#39;http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?share=reddit&#39;, &#39;Reddit&#39;]);" rel="nofollow" class="share-reddit sd-button share-icon" title="Click to share on Reddit"><span>Reddit</span></a></li><li class="share-pinterest"><a href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?share=pinterest&nb=1" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article-int&#39;, &#39;http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?share=pinterest&#39;, &#39;Pinterest&#39;]);" rel="nofollow" class="share-pinterest sd-button share-icon" title="Click to share on Pinterest"><span>Pinterest</span></a></li><li class="share-tumblr"><a href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?share=tumblr&nb=1" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article-int&#39;, &#39;http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?share=tumblr&#39;, &#39;Tumblr&#39;]);" rel="nofollow" class="share-tumblr sd-button share-icon" title="Click to share on Tumblr"><span>Tumblr</span></a></li><li class="share-stumbleupon"><a href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?share=stumbleupon&nb=1" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article-int&#39;, &#39;http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?share=stumbleupon&#39;, &#39;StumbleUpon&#39;]);" rel="nofollow" class="share-stumbleupon sd-button share-icon" title="Click to share on StumbleUpon"><span>StumbleUpon</span></a></li><li class="share-linkedin"><a href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?share=linkedin&nb=1" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-article-int&#39;, &#39;http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?share=linkedin&#39;, &#39;LinkedIn&#39;]);" rel="nofollow" class="share-linkedin sd-button share-icon" title="Click to share on LinkedIn" id="sharing-linkedin-1659"><span>LinkedIn</span></a></li><li class="share-end"></li></ul></div></div></div><div class="sharedaddy sd-block sd-like jetpack-likes-widget-wrapper jetpack-likes-widget-loaded" id="like-post-wrapper-43628880-1659-54512ad69f0e1" data-src="//widgets.wp.com/likes/#blog_id=43628880&amp;post_id=1659&amp;origin=jacobsalmela.com&amp;obj_id=43628880-1659-54512ad69f0e1" data-name="like-post-frame-43628880-1659-54512ad69f0e1"><h3 class="sd-title">Like this:</h3><div class="likes-widget-placeholder post-likes-widget-placeholder" style="height: 55px; display: none;"><span class="button"><span>Like</span></span> <span class="loading">Loading...</span></div><iframe class="post-likes-widget jetpack-likes-widget" name="like-post-frame-43628880-1659-54512ad69f0e1" height="55px" width="100%" frameborder="0" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/saved_resource(3).html"></iframe><span class="sd-text-color"></span><a class="sd-link-color"></a></div>
<div id="jp-relatedposts" class="jp-relatedposts" style="display: block;">
	<h3 class="jp-relatedposts-headline"><em>Related</em></h3>
<div class="jp-relatedposts-items jp-relatedposts-items-visual"><div class="jp-relatedposts-post jp-relatedposts-post0 jp-relatedposts-post-thumbs" data-post-id="1751" data-post-format="false"><a class="jp-relatedposts-post-a" href="http://jacobsalmela.com/raspberry-pi-block-ads-adtrap/" title="Pi-hole: A Raspberry Pi Ad-Blocker with DNS Caching (Ultra-fast)

[UPDATE] Check out the Advanced Setup for more Pi ad-blocking power! Block online ads by using your Raspberry Pi to manipulate advertising URLs.  Even block Hulu Plus ads on your Apple TV,&amp;hellip;" rel="nofollow" data-origin="1659" data-position="0"><img class="jp-relatedposts-post-img" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/jacob_salmela_Pihole.jpg" width="350" alt="Pi-hole: A Raspberry Pi Ad-Blocker with DNS Caching (Ultra-fast)"></a><h4 class="jp-relatedposts-post-title"><a class="jp-relatedposts-post-a" href="http://jacobsalmela.com/raspberry-pi-block-ads-adtrap/" title="Pi-hole: A Raspberry Pi Ad-Blocker with DNS Caching (Ultra-fast)

[UPDATE] Check out the Advanced Setup for more Pi ad-blocking power! Block online ads by using your Raspberry Pi to manipulate advertising URLs.  Even block Hulu Plus ads on your Apple TV,&amp;hellip;" rel="nofollow" data-origin="1659" data-position="0">Pi-hole: A Raspberry Pi Ad-Blocker with DNS Caching (Ultra-fast)</a></h4><p class="jp-relatedposts-post-excerpt">[UPDATE] Check out the Advanced Setup for more Pi ad-blocking power! Block online ads by using your Raspberry Pi&nbsp;to manipulate advertising URLs. &nbsp;Even block Hulu Plus ads on&nbsp;your Apple TV,…</p><p class="jp-relatedposts-post-context">In "*Nix"</p></div><div class="jp-relatedposts-post jp-relatedposts-post1 jp-relatedposts-post-thumbs" data-post-id="1005" data-post-format="false"><a class="jp-relatedposts-post-a" href="http://jacobsalmela.com/raspberry-pi-and-ip-how-to-set-a-static-ip-address/" title="Raspberry Pi and IP: How-to Set a Static IP Address

Setting up an static IP address on a Raspberry Pi (RPi) is a good idea if the RPi will host any services such as an OpenVPN server, a live-steam Webcam,&amp;hellip;" rel="nofollow" data-origin="1659" data-position="1"><img class="jp-relatedposts-post-img" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/network-blue1.png" width="350" alt="Raspberry Pi and IP: How-to Set a Static IP Address"></a><h4 class="jp-relatedposts-post-title"><a class="jp-relatedposts-post-a" href="http://jacobsalmela.com/raspberry-pi-and-ip-how-to-set-a-static-ip-address/" title="Raspberry Pi and IP: How-to Set a Static IP Address

Setting up an static IP address on a Raspberry Pi (RPi) is a good idea if the RPi will host any services such as an OpenVPN server, a live-steam Webcam,&amp;hellip;" rel="nofollow" data-origin="1659" data-position="1">Raspberry Pi and IP: How-to Set a Static IP Address</a></h4><p class="jp-relatedposts-post-excerpt">Setting up an static IP address on a Raspberry Pi (RPi) is a good idea if the RPi will host any services such as an OpenVPN server, a live-steam Webcam,…</p><p class="jp-relatedposts-post-context">In "Raspberry Pi"</p></div><div class="jp-relatedposts-post jp-relatedposts-post2 jp-relatedposts-post-thumbs" data-post-id="994" data-post-format="false"><a class="jp-relatedposts-post-a" href="http://jacobsalmela.com/raspberry-pi-and-raspbian-wheezy-how-to-setup-a-raspberry-pi-after-buying-one/" title="Raspberry Pi and Raspbian &quot;wheezy&quot;: How-to Setup a Raspberry Pi After Buying One

A step-by-step walkthrough for quickly setting up a Raspberry Pi (Model B)--hassle-free.  The Raspberry Pi is a low-power computer for only $35 (it ends up costing a lot more after you buy&amp;hellip;" rel="nofollow" data-origin="1659" data-position="2"><img class="jp-relatedposts-post-img" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/raspbian_logo-150x25.png" width="350" alt="Raspberry Pi and Raspbian " wheezy":="" how-to="" setup="" a="" raspberry="" pi="" after="" buying="" one"=""></a><h4 class="jp-relatedposts-post-title"><a class="jp-relatedposts-post-a" href="http://jacobsalmela.com/raspberry-pi-and-raspbian-wheezy-how-to-setup-a-raspberry-pi-after-buying-one/" title="Raspberry Pi and Raspbian &quot;wheezy&quot;: How-to Setup a Raspberry Pi After Buying One

A step-by-step walkthrough for quickly setting up a Raspberry Pi (Model B)--hassle-free.  The Raspberry Pi is a low-power computer for only $35 (it ends up costing a lot more after you buy&amp;hellip;" rel="nofollow" data-origin="1659" data-position="2">Raspberry Pi and Raspbian "wheezy": How-to Setup a Raspberry Pi After Buying One</a></h4><p class="jp-relatedposts-post-excerpt">A step-by-step walkthrough for quickly setting up a Raspberry Pi (Model B)--hassle-free. &nbsp;The Raspberry Pi is a low-power computer for only $35 (it ends up&nbsp;costing a lot more&nbsp;after you buy…</p><p class="jp-relatedposts-post-context">In "Raspberry Pi"</p></div></div></div>					</div><!-- .entry-content -->
		
		<footer class="entry-meta">
			This entry was posted in <a href="http://jacobsalmela.com/category/projects/" rel="category tag">Projects</a>, <a href="http://jacobsalmela.com/category/raspberry-pi/" rel="category tag">Raspberry Pi</a> and tagged <a href="http://jacobsalmela.com/tag/dns/" rel="tag">dns</a>, <a href="http://jacobsalmela.com/tag/projects-2/" rel="tag">projects</a>, <a href="http://jacobsalmela.com/tag/raspberrypi/" rel="tag">raspberrypi</a> on <a href="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre.html" title="14:18" rel="bookmark"><time class="entry-date" datetime="2014-05-31T14:18:19+00:00">2014-05-31</time></a><span class="by-author"> by <span class="author vcard"><a class="url fn n" href="http://jacobsalmela.com/author/jacob.salmela/" title="View all posts by Jacob Salmela" rel="author">Jacob Salmela</a></span></span>.								</footer><!-- .entry-meta -->
	</article><!-- #post -->

				<nav class="nav-single">
					<h3 class="assistive-text">Post navigation</h3>
					<span class="nav-previous"><a href="http://jacobsalmela.com/password-protect-a-lighttpd-web-server-on-a-raspberry-pi-using-mod-auth/" rel="prev"><span class="meta-nav">←</span> Password-protect A lighttpd Web Server on a Raspberry Pi Using mod_auth</a></span>
					<span class="nav-next"><a href="http://jacobsalmela.com/os-x-users-folder-on-a-separate-partition-using-bash-script-casper-imaging/" rel="next">OS X Users Folder On A Separate Partition Using bash Scripts and Casper Imaging <span class="meta-nav">→</span></a></span>
				</nav><!-- .nav-single -->

				
<div id="comments" class="comments-area">

	
			<h2 class="comments-title">
			18 thoughts on “<span>Raspberry Pi Webcam Over the Internet Using MJPG-Streamer</span>”		</h2>

		<ol class="commentlist">
				<li class="comment even thread-even depth-1" id="li-comment-130">
		<article id="comment-130" class="comment">
			<header class="comment-meta comment-author vcard">
				<img alt="" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/826dd67b20d46ed7a02924e244c70bbd" class="avatar avatar-44 photo" height="44" width="44"><cite><b class="fn"><a href="http://botmayank.wordpress.com/" rel="external nofollow" class="url">mayankjoneja</a></b> </cite><a href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/#comment-130"><time datetime="2014-07-16T15:14:51+00:00">2014-07-16 at 15:14</time></a>			</header><!-- .comment-meta -->

			
			<section class="comment-content comment">
				<p>Really good job of compiling this article. I’ve used mjpg-streamer and I know how much of a pain it can be to set it up without resources like this post to help you out <img src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/icon_biggrin.gif" alt=":D" class="wp-smiley"> </p>
<p>Quick question, haven’t explored it yet, but what’s the easiest way to stream as well as process a webcam stream? Say, using OpenCV? </p>
<p>Also, capturing stills with mjpg-streamer is as simple as linking a button action to the still image page in the default page hosted when the server is launched right? I haven’t tried it yet so just wanted to know if there’s anything else involved.</p>
							</section><!-- .comment-content -->

			<div class="reply">
				<a class="comment-reply-link" href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?replytocom=130#respond" onclick="return addComment.moveForm(&quot;comment-130&quot;, &quot;130&quot;, &quot;respond&quot;, &quot;1659&quot;)">Reply</a> <span>↓</span>			</div><!-- .reply -->
		</article><!-- #comment-## -->
	<ol class="children">
	<li class="comment byuser comment-author-jacobsalmela bypostauthor odd alt depth-2" id="li-comment-131">
		<article id="comment-131" class="comment">
			<header class="comment-meta comment-author vcard">
				<img alt="" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/e9bc91bf7a318cbe562b3a954fab870f" class="avatar avatar-44 photo" height="44" width="44"><cite><b class="fn"><a href="http://www.jacobsalmela.com/" rel="external nofollow" class="url">Jacob Salmela</a></b> <span>Post author</span></cite><a href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/#comment-131"><time datetime="2014-07-16T15:24:13+00:00">2014-07-16 at 15:24</time></a>			</header><!-- .comment-meta -->

			
			<section class="comment-content comment">
				<p>Unfortunately, I am not familiar with OpenCV, so I can’t say much on that topic.  </p>
<p>Yes, as far as I know, you can just link to the static page and you could save it from there.</p>
							</section><!-- .comment-content -->

			<div class="reply">
				<a class="comment-reply-link" href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?replytocom=131#respond" onclick="return addComment.moveForm(&quot;comment-131&quot;, &quot;131&quot;, &quot;respond&quot;, &quot;1659&quot;)">Reply</a> <span>↓</span>			</div><!-- .reply -->
		</article><!-- #comment-## -->
	</li><!-- #comment-## -->
</ol><!-- .children -->
</li><!-- #comment-## -->
	<li class="comment even thread-odd thread-alt depth-1" id="li-comment-167">
		<article id="comment-167" class="comment">
			<header class="comment-meta comment-author vcard">
				<img alt="" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/c25afbd4104cdbe5c36d38acbb81619f" class="avatar avatar-44 photo" height="44" width="44"><cite><b class="fn">Muhammad Sadiq odho</b> </cite><a href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/#comment-167"><time datetime="2014-07-26T06:07:23+00:00">2014-07-26 at 06:07</time></a>			</header><!-- .comment-meta -->

			
			<section class="comment-content comment">
				<p>I have installed it but there is an error when i try</p>
<p>mjpg_streamer -i “/usr/local/lib/input_uvc.so” -o “/usr/local/lib/output_http.so -w /usr/local/www”</p>
<p>error:<br>
MJPG Streamer Version: svn rev: 3:172  i: Using V4L2 device.: /dev/video0  i: Desired Resolution: 640 x 480  i: Frames Per Second.: 5  i: Format…………: MJPEG Unable to set format: 1196444237 res: 640×480  Init v4L2 failed !! exit fatal  i: init_VideoIn failed</p>
<p>there is no ouput on localhost too.<br>
What should I do?</p>
							</section><!-- .comment-content -->

			<div class="reply">
				<a class="comment-reply-link" href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?replytocom=167#respond" onclick="return addComment.moveForm(&quot;comment-167&quot;, &quot;167&quot;, &quot;respond&quot;, &quot;1659&quot;)">Reply</a> <span>↓</span>			</div><!-- .reply -->
		</article><!-- #comment-## -->
	<ol class="children">
	<li class="comment byuser comment-author-jacobsalmela bypostauthor odd alt depth-2" id="li-comment-168">
		<article id="comment-168" class="comment">
			<header class="comment-meta comment-author vcard">
				<img alt="" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/e9bc91bf7a318cbe562b3a954fab870f" class="avatar avatar-44 photo" height="44" width="44"><cite><b class="fn"><a href="http://www.jacobsalmela.com/" rel="external nofollow" class="url">Jacob Salmela</a></b> <span>Post author</span></cite><a href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/#comment-168"><time datetime="2014-07-26T12:12:57+00:00">2014-07-26 at 12:12</time></a>			</header><!-- .comment-meta -->

			
			<section class="comment-content comment">
				<p>Try launching mjpg_streamer with the additional option: <code>-y YUYV</code>, which enables YUYV format and disables MJPEG mode.  The error might be because your Webcam does not support the mjpg format.</p>
							</section><!-- .comment-content -->

			<div class="reply">
				<a class="comment-reply-link" href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?replytocom=168#respond" onclick="return addComment.moveForm(&quot;comment-168&quot;, &quot;168&quot;, &quot;respond&quot;, &quot;1659&quot;)">Reply</a> <span>↓</span>			</div><!-- .reply -->
		</article><!-- #comment-## -->
	</li><!-- #comment-## -->
</ol><!-- .children -->
</li><!-- #comment-## -->
	<li class="comment even thread-even depth-1" id="li-comment-174">
		<article id="comment-174" class="comment">
			<header class="comment-meta comment-author vcard">
				<img alt="" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/c25afbd4104cdbe5c36d38acbb81619f" class="avatar avatar-44 photo" height="44" width="44"><cite><b class="fn">Muhammad Sadiq odho</b> </cite><a href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/#comment-174"><time datetime="2014-07-28T03:47:31+00:00">2014-07-28 at 03:47</time></a>			</header><!-- .comment-meta -->

			
			<section class="comment-content comment">
				<p>I have faced problem when i want to ./mjpg-streamer.sh start<br>
faild to start</p>
<p>I am using<br>
Bus 001 Device 006: ID 041e:4034 Creative Technology, Ltd Webcam Instant</p>
<p>mjgp-streamer.log<br>
————————–<br>
MJPG Streamer Version: svn rev: 3:160M<br>
 i: Using V4L2 device.: /dev/video0<br>
 i: Desired Resolution: 640 x 480<br>
 i: Frames Per Second.: 4<br>
 i: Format…………: YUV<br>
 i: JPEG Quality……: 80<br>
i: The format asked unavailable, so the width 352 height 288<br>
The input device does not supports YUV mode<br>
 Init v4L2 failed !! exit fatal<br>
 i: init_VideoIn failed<br>
MJPG Streamer Version: svn rev: 3:160M<br>
 i: Using V4L2 device.: /dev/video0<br>
 i: Desired Resolution: 640 x 480<br>
 i: Frames Per Second.: 4<br>
 i: Format…………: MJPEG<br>
i: The format asked unavailable, so the width 352 height 288<br>
The inpout device does not supports MJPEG mode<br>
You may also try the YUV mode (-yuv option), but it requires a much more CPU power<br>
 Init v4L2 failed !! exit fatal<br>
 i: init_VideoIn failed<br>
MJPG Streamer Version: svn rev: 3:160M<br>
 i: Using V4L2 device.: /dev/video0<br>
 i: Desired Resolution: 320 x 240<br>
 i: Frames Per Second.: 5<br>
 i: Format…………: MJPEG<br>
i: The format asked unavailable, so the width 176 height 144<br>
The inpout device does not supports MJPEG mode<br>
You may also try the YUV mode (-yuv option), but it requires a much more CPU power<br>
 Init v4L2 failed !! exit fatal<br>
 i: init_VideoIn failed<br>
MJPG Streamer Version: svn rev: 3:160M<br>
 i: Using V4L2 device.: /dev/video0<br>
 i: Desired Resolution: 320 x 240<br>
 i: Frames Per Second.: 5<br>
 i: Format…………: MJPEG<br>
i: The format asked unavailable, so the width 176 height 144<br>
The inpout device does not supports MJPEG mode<br>
You may also try the YUV mode (-yuv option), but it requires a much more CPU power<br>
 Init v4L2 failed !! exit fatal<br>
 i: init_VideoIn failed</p>
<p>mjpg-streamer.sh<br>
—————————–<br>
#!/bin/bash</p>
<p>VIDEO_DEV=”/dev/video0″<br>
FRAME_RATE=”4″<br>
RESOLUTION=”640×480″<br>
PORT=”8080″<br>
YUV=”true”</p>
<p>MJPG_STREAMER_DIR=”$(dirname $0)”<br>
MJPG_STREAMER_BIN=”mjpg_streamer”<br>
LOG_FILE=”${MJPG_STREAMER_DIR}/mjpg-streamer.log”<br>
RUNNING_CHECK_INTERVAL=”2″ # how often to check to make sure the server is running (in seconds)<br>
HANGING_CHECK_INTERVAL=”3″ # how often to check to make sure the server is not hanging (in seconds)</p>
<p>function running() {<br>
    if ps aux | grep ${MJPG_STREAMER_BIN} | grep ${VIDEO_DEV} &gt;/dev/null 2&gt;&amp;1; then<br>
        return 0</p>
<p>    else<br>
        return 1</p>
<p>    fi<br>
}</p>
<p>function start() {<br>
    if running; then<br>
        echo “already started”<br>
        return 1<br>
    fi</p>
<p>    export LD_LIBRARY_PATH=”${MJPG_STREAMER_DIR}:.”</p>
<p>    INPUT_OPTIONS=”-r ${RESOLUTION} -d ${VIDEO_DEV} -f ${FRAME_RATE}”<br>
    if [ "${YUV}" == "true" ]; then<br>
        INPUT_OPTIONS+=” -y”<br>
    fi</p>
<p>    OUTPUT_OPTIONS=”-p ${PORT} -w www”</p>
<p>    ${MJPG_STREAMER_DIR}/${MJPG_STREAMER_BIN} -i “input_uvc.so ${INPUT_OPTIONS}” -o “output_http.so ${OUTPUT_OPTIONS}” &gt;&gt; ${LOG_FILE} 2&gt;&amp;1 &amp;</p>
<p>    sleep 1</p>
<p>    if running; then<br>
        if [ "$1" != "nocheck" ]; then<br>
            check_running &amp; &gt; /dev/null 2&gt;&amp;1 # start the running checking task<br>
            check_hanging &amp; &gt; /dev/null 2&gt;&amp;1 # start the hanging checking task<br>
        fi</p>
<p>        echo “started”<br>
        return 0</p>
<p>    else<br>
        echo “failed to start”<br>
        return 1</p>
<p>    fi<br>
}</p>
<p>function stop() {<br>
    if ! running; then<br>
        echo “not running”<br>
        return 1<br>
    fi</p>
<p>    own_pid=$$</p>
<p>    if [ "$1" != "nocheck" ]; then<br>
        # stop the script running check task<br>
        ps aux | grep $0 | grep start | tr -s ‘ ‘ | cut -d ‘ ‘ -f 2 | grep -v ${own_pid} | xargs -r kill<br>
        sleep 0.5<br>
    fi</p>
<p>    # stop the server<br>
    ps aux | grep ${MJPG_STREAMER_BIN} | grep ${VIDEO_DEV} | tr -s ‘ ‘ | cut -d ‘ ‘ -f 2 | grep -v ${own_pid} | xargs -r kill</p>
<p>    echo “stopped”<br>
    return 0<br>
}</p>
<p>function check_running() {<br>
    echo “starting running check task” &gt;&gt; ${LOG_FILE}</p>
<p>    while true; do<br>
        sleep ${RUNNING_CHECK_INTERVAL}</p>
<p>        if ! running; then<br>
            echo “server stopped, starting” &gt;&gt; ${LOG_FILE}<br>
            start nocheck<br>
        fi<br>
    done<br>
}</p>
<p>function check_hanging() {<br>
    echo “starting hanging check task” &gt;&gt; ${LOG_FILE}</p>
<p>    while true; do<br>
        sleep ${HANGING_CHECK_INTERVAL}</p>
<p>        # treat the “error grabbing frames” case<br>
        if tail -n2 ${LOG_FILE} | grep -i “error grabbing frames” &gt; /dev/null; then<br>
            echo “server is hanging, killing” &gt;&gt; ${LOG_FILE}<br>
            stop nocheck<br>
        fi<br>
    done<br>
}</p>
<p>function help() {<br>
    echo “Usage: $0 [start|stop|restart|status]”<br>
    return 0<br>
}</p>
<p>if [ "$1" == "start" ]; then<br>
    start &amp;&amp; exit 0 || exit -1</p>
<p>elif [ "$1" == "stop" ]; then<br>
    stop &amp;&amp; exit 0 || exit -1</p>
<p>elif [ "$1" == "restart" ]; then<br>
    stop &amp;&amp; sleep 1<br>
    start &amp;&amp; exit 0 || exit -1</p>
<p>elif [ "$1" == "status" ]; then<br>
    if running; then<br>
        echo “running”<br>
        exit 0</p>
<p>    else<br>
        echo “stopped”<br>
        exit 1</p>
<p>    fi</p>
<p>else<br>
    help</p>
<p>fi</p>
<p>kindly guide me i have tried a lot.</p>
							</section><!-- .comment-content -->

			<div class="reply">
				<a class="comment-reply-link" href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?replytocom=174#respond" onclick="return addComment.moveForm(&quot;comment-174&quot;, &quot;174&quot;, &quot;respond&quot;, &quot;1659&quot;)">Reply</a> <span>↓</span>			</div><!-- .reply -->
		</article><!-- #comment-## -->
	<ol class="children">
	<li class="comment byuser comment-author-jacobsalmela bypostauthor odd alt depth-2" id="li-comment-175">
		<article id="comment-175" class="comment">
			<header class="comment-meta comment-author vcard">
				<img alt="" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/e9bc91bf7a318cbe562b3a954fab870f" class="avatar avatar-44 photo" height="44" width="44"><cite><b class="fn"><a href="http://www.jacobsalmela.com/" rel="external nofollow" class="url">Jacob Salmela</a></b> <span>Post author</span></cite><a href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/#comment-175"><time datetime="2014-07-28T11:24:58+00:00">2014-07-28 at 11:24</time></a>			</header><!-- .comment-meta -->

			
			<section class="comment-content comment">
				<p>Based off of your log file, it looks like your Webcam does not support either format–see the bolded lines:</p>
<p><em>i: The format asked unavailable, so the width 352 height 288<br>
<strong>The input device does not supports YUV mode</strong><br>
Init v4L2 failed !! exit fatal<br>
i: init_VideoIn failed<br>
MJPG Streamer Version: svn rev: 3:160M<br>
i: Using V4L2 device.: /dev/video0<br>
i: Desired Resolution: 640 x 480<br>
i: Frames Per Second.: 4<br>
i: Format…………: MJPEG<br>
i: The format asked unavailable, so the width 352 height 288<br>
<strong>The inpout device does not supports MJPEG mode</strong><br>
You may also try the YUV mode (-yuv option), but it requires a much more CPU power</em></p>
<p>I also noticed the Instant Webcam is not listed on the <a href="http://elinux.org/RPi_USB_Webcams" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-comment&#39;, &#39;http://elinux.org/RPi_USB_Webcams&#39;, &#39;list of supported devices&#39;]);" rel="nofollow">list of supported devices</a>.</p>
<p>If you wanted to be sure you could install a utility to check:<br>
<code>sudo apt-get install uvcdynctrl<br>
uvcdynctrl -f</code></p>
<p>You will probably need to get a different Webcam.</p>
							</section><!-- .comment-content -->

			<div class="reply">
				<a class="comment-reply-link" href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?replytocom=175#respond" onclick="return addComment.moveForm(&quot;comment-175&quot;, &quot;175&quot;, &quot;respond&quot;, &quot;1659&quot;)">Reply</a> <span>↓</span>			</div><!-- .reply -->
		</article><!-- #comment-## -->
	</li><!-- #comment-## -->
</ol><!-- .children -->
</li><!-- #comment-## -->
	<li class="comment even thread-odd thread-alt depth-1" id="li-comment-178">
		<article id="comment-178" class="comment">
			<header class="comment-meta comment-author vcard">
				<img alt="" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/c25afbd4104cdbe5c36d38acbb81619f" class="avatar avatar-44 photo" height="44" width="44"><cite><b class="fn">Muhammad Sadiq Odho</b> </cite><a href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/#comment-178"><time datetime="2014-07-31T07:35:27+00:00">2014-07-31 at 07:35</time></a>			</header><!-- .comment-meta -->

			
			<section class="comment-content comment">
				<p>it works fine when i use motion instead of mjpg-streamer. I don’t know what is the video format there. It means webcam works fine. isn’t?</p>
							</section><!-- .comment-content -->

			<div class="reply">
				<a class="comment-reply-link" href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?replytocom=178#respond" onclick="return addComment.moveForm(&quot;comment-178&quot;, &quot;178&quot;, &quot;respond&quot;, &quot;1659&quot;)">Reply</a> <span>↓</span>			</div><!-- .reply -->
		</article><!-- #comment-## -->
	<ol class="children">
	<li class="comment byuser comment-author-jacobsalmela bypostauthor odd alt depth-2" id="li-comment-179">
		<article id="comment-179" class="comment">
			<header class="comment-meta comment-author vcard">
				<img alt="" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/e9bc91bf7a318cbe562b3a954fab870f" class="avatar avatar-44 photo" height="44" width="44"><cite><b class="fn"><a href="http://www.jacobsalmela.com/" rel="external nofollow" class="url">Jacob Salmela</a></b> <span>Post author</span></cite><a href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/#comment-179"><time datetime="2014-07-31T16:01:55+00:00">2014-07-31 at 16:01</time></a>			</header><!-- .comment-meta -->

			
			<section class="comment-content comment">
				<p>I don’t believe so.  motion uses</p>
<ul>
<li>jpg files</li>
<li>ppm format files</li>
<li>mpeg video sequences</li>
</ul>
<p>I don’t know all the technical differences on the formats, but I still think you need a different Webcam based off your log file.  The only other thing I could think to try is to lower the resolution…</p>
							</section><!-- .comment-content -->

			<div class="reply">
				<a class="comment-reply-link" href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?replytocom=179#respond" onclick="return addComment.moveForm(&quot;comment-179&quot;, &quot;179&quot;, &quot;respond&quot;, &quot;1659&quot;)">Reply</a> <span>↓</span>			</div><!-- .reply -->
		</article><!-- #comment-## -->
	</li><!-- #comment-## -->
</ol><!-- .children -->
</li><!-- #comment-## -->
	<li class="comment even thread-even depth-1" id="li-comment-180">
		<article id="comment-180" class="comment">
			<header class="comment-meta comment-author vcard">
				<img alt="" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/057d74b6ec944a144d4791a38cc33da1" class="avatar avatar-44 photo" height="44" width="44"><cite><b class="fn"><a href="https://plus.google.com/107912183133133503620" rel="external nofollow" class="url">Roland Gallinera</a></b> </cite><a href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/#comment-180"><time datetime="2014-07-31T20:26:03+00:00">2014-07-31 at 20:26</time></a>			</header><!-- .comment-meta -->

			
			<section class="comment-content comment">
				<p>Nice tutorial, I have been using mjpeg-streamer with Pogoplugs and dockstars using Logitech Quickcam Pros, streaming on the web at 10fps and recording 1 image per second, and have a cron job running every two hours, generating an timelapse AVI file) and was planning on using my Raspberry pi with Pi Cam for my outside of the house security cam. But when I saw the smooth stream from Raspivid, I became dis-illusioned with the streams from mjpeg-streamer as at most I can get from the quickcam 9000 was 10 fps at 960×720 (vs. 1080p from Raspicam). However I can never get both livestreaming and recording to work at the same time (except if I get a PC to record the livestream off the raspberry Pi) so I guess I’m stuck with mjpeg-streamer. </p>
<p>I’ve seen some tutorials involving a Beaglebone Black with a Logitech C920 that has beautiful recordings, but the C920 is way too expensive vs the Raspicam… </p>
<p>I was wondering if you know how I can get HD video streams with recordings with Raspberry?</p>
							</section><!-- .comment-content -->

			<div class="reply">
				<a class="comment-reply-link" href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?replytocom=180#respond" onclick="return addComment.moveForm(&quot;comment-180&quot;, &quot;180&quot;, &quot;respond&quot;, &quot;1659&quot;)">Reply</a> <span>↓</span>			</div><!-- .reply -->
		</article><!-- #comment-## -->
	<ol class="children">
	<li class="comment byuser comment-author-jacobsalmela bypostauthor odd alt depth-2" id="li-comment-181">
		<article id="comment-181" class="comment">
			<header class="comment-meta comment-author vcard">
				<img alt="" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/e9bc91bf7a318cbe562b3a954fab870f" class="avatar avatar-44 photo" height="44" width="44"><cite><b class="fn"><a href="http://www.jacobsalmela.com/" rel="external nofollow" class="url">Jacob Salmela</a></b> <span>Post author</span></cite><a href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/#comment-181"><time datetime="2014-08-01T00:03:18+00:00">2014-08-01 at 00:03</time></a>			</header><!-- .comment-meta -->

			
			<section class="comment-content comment">
				<p>Sorry, I don’t.  </p>
<p>I tried a few different Webcams while writing this tutorial, along with other pieces of software (like motion) but came out with similar results as you.  The Pi might just not have enough power to do HD live streams.  I have considered trying the <a href="http://www.solid-run.com/shop/" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-comment&#39;, &#39;http://www.solid-run.com/shop/&#39;, &#39;Hummingboard&#39;]);" target="_blank" rel="nofollow">Hummingboard</a> since it seems to be a little bit more powerful.</p>
<p>If I do find something out, I’ll post it here.</p>
							</section><!-- .comment-content -->

			<div class="reply">
				<a class="comment-reply-link" href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?replytocom=181#respond" onclick="return addComment.moveForm(&quot;comment-181&quot;, &quot;181&quot;, &quot;respond&quot;, &quot;1659&quot;)">Reply</a> <span>↓</span>			</div><!-- .reply -->
		</article><!-- #comment-## -->
	<ol class="children">
	<li class="comment even depth-3" id="li-comment-182">
		<article id="comment-182" class="comment">
			<header class="comment-meta comment-author vcard">
				<img alt="" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/057d74b6ec944a144d4791a38cc33da1" class="avatar avatar-44 photo" height="44" width="44"><cite><b class="fn"><a href="https://plus.google.com/107912183133133503620" rel="external nofollow" class="url">Roland Gallinera</a></b> </cite><a href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/#comment-182"><time datetime="2014-08-01T20:27:57+00:00">2014-08-01 at 20:27</time></a>			</header><!-- .comment-meta -->

			
			<section class="comment-content comment">
				<p>I have a Beaglebone Black and a Cubox-i4 Pro and have considered these,as my live streamers, but I found that I still need an expensive webcam for them if I want HD Live streams. Hopefully, there is something out there that uses Raspi cam which is priced reasonably…</p>
							</section><!-- .comment-content -->

			<div class="reply">
				<a class="comment-reply-link" href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?replytocom=182#respond" onclick="return addComment.moveForm(&quot;comment-182&quot;, &quot;182&quot;, &quot;respond&quot;, &quot;1659&quot;)">Reply</a> <span>↓</span>			</div><!-- .reply -->
		</article><!-- #comment-## -->
	<ol class="children">
	<li class="comment byuser comment-author-jacobsalmela bypostauthor odd alt depth-4" id="li-comment-183">
		<article id="comment-183" class="comment">
			<header class="comment-meta comment-author vcard">
				<img alt="" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/e9bc91bf7a318cbe562b3a954fab870f" class="avatar avatar-44 photo" height="44" width="44"><cite><b class="fn"><a href="http://www.jacobsalmela.com/" rel="external nofollow" class="url">Jacob Salmela</a></b> <span>Post author</span></cite><a href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/#comment-183"><time datetime="2014-08-01T20:35:50+00:00">2014-08-01 at 20:35</time></a>			</header><!-- .comment-meta -->

			
			<section class="comment-content comment">
				<p>I guess there is a tradeoff for HD or low-cost.  Can you get HD using your expensive Webcams with the Pi?  Or do you need the extra power as well?</p>
							</section><!-- .comment-content -->

			<div class="reply">
				<a class="comment-reply-link" href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?replytocom=183#respond" onclick="return addComment.moveForm(&quot;comment-183&quot;, &quot;183&quot;, &quot;respond&quot;, &quot;1659&quot;)">Reply</a> <span>↓</span>			</div><!-- .reply -->
		</article><!-- #comment-## -->
	</li><!-- #comment-## -->
</ol><!-- .children -->
</li><!-- #comment-## -->
</ol><!-- .children -->
</li><!-- #comment-## -->
</ol><!-- .children -->
</li><!-- #comment-## -->
	<li class="comment even thread-odd thread-alt depth-1" id="li-comment-330">
		<article id="comment-330" class="comment">
			<header class="comment-meta comment-author vcard">
				<img alt="" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/b0d9e1e19ecf664324ec425f587b8c5f" class="avatar avatar-44 photo" height="44" width="44"><cite><b class="fn">patrick</b> </cite><a href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/#comment-330"><time datetime="2014-10-19T05:46:06+00:00">2014-10-19 at 05:46</time></a>			</header><!-- .comment-meta -->

			
			<section class="comment-content comment">
				<p>Thank you for this work you done works very well</p>
							</section><!-- .comment-content -->

			<div class="reply">
				<a class="comment-reply-link" href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?replytocom=330#respond" onclick="return addComment.moveForm(&quot;comment-330&quot;, &quot;330&quot;, &quot;respond&quot;, &quot;1659&quot;)">Reply</a> <span>↓</span>			</div><!-- .reply -->
		</article><!-- #comment-## -->
	<ol class="children">
	<li class="comment byuser comment-author-jacobsalmela bypostauthor odd alt depth-2" id="li-comment-331">
		<article id="comment-331" class="comment">
			<header class="comment-meta comment-author vcard">
				<img alt="" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/e9bc91bf7a318cbe562b3a954fab870f" class="avatar avatar-44 photo" height="44" width="44"><cite><b class="fn"><a href="http://www.jacobsalmela.com/" rel="external nofollow" class="url">Jacob Salmela</a></b> <span>Post author</span></cite><a href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/#comment-331"><time datetime="2014-10-19T09:09:34+00:00">2014-10-19 at 09:09</time></a>			</header><!-- .comment-meta -->

			
			<section class="comment-content comment">
				<p>I’m glad it works!</p>
							</section><!-- .comment-content -->

			<div class="reply">
				<a class="comment-reply-link" href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?replytocom=331#respond" onclick="return addComment.moveForm(&quot;comment-331&quot;, &quot;331&quot;, &quot;respond&quot;, &quot;1659&quot;)">Reply</a> <span>↓</span>			</div><!-- .reply -->
		</article><!-- #comment-## -->
	</li><!-- #comment-## -->
</ol><!-- .children -->
</li><!-- #comment-## -->
	<li class="comment even thread-even depth-1" id="li-comment-345">
		<article id="comment-345" class="comment">
			<header class="comment-meta comment-author vcard">
				<img alt="" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/2aeaf1cfbed24ac47d47387de02ea37c" class="avatar avatar-44 photo" height="44" width="44"><cite><b class="fn">Glen Page</b> </cite><a href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/#comment-345"><time datetime="2014-10-24T10:40:42+00:00">2014-10-24 at 10:40</time></a>			</header><!-- .comment-meta -->

			
			<section class="comment-content comment">
				<p>Thanks for the tutorial. I am pretty sure I followed your instructions but below is what I get when I enter<br>
mjpg_streamer -i “/usr/local/lib/input_uvc.so” -o “/usr/local/lib/output_http.so -w /usr/local/www”</p>
<p>MJPG Streamer Version: svn rev: 3:172<br>
 i: Using V4L2 device.: /dev/video0<br>
 i: Desired Resolution: 640 x 480<br>
 i: Frames Per Second.: 5<br>
 i: Format…………: MJPEG<br>
ERROR opening V4L interface: No such file or directory<br>
 Init v4L2 failed !! exit fatal<br>
 i: init_VideoIn failed</p>
<p>I am using a RaspberryPi B+ and a Pi Camera module. What do I try next?</p>
<p>TIA,  Glen</p>
							</section><!-- .comment-content -->

			<div class="reply">
				<a class="comment-reply-link" href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?replytocom=345#respond" onclick="return addComment.moveForm(&quot;comment-345&quot;, &quot;345&quot;, &quot;respond&quot;, &quot;1659&quot;)">Reply</a> <span>↓</span>			</div><!-- .reply -->
		</article><!-- #comment-## -->
	<ol class="children">
	<li class="comment byuser comment-author-jacobsalmela bypostauthor odd alt depth-2" id="li-comment-346">
		<article id="comment-346" class="comment">
			<header class="comment-meta comment-author vcard">
				<img alt="" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/e9bc91bf7a318cbe562b3a954fab870f" class="avatar avatar-44 photo" height="44" width="44"><cite><b class="fn"><a href="http://www.jacobsalmela.com/" rel="external nofollow" class="url">Jacob Salmela</a></b> <span>Post author</span></cite><a href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/#comment-346"><time datetime="2014-10-24T11:22:59+00:00">2014-10-24 at 11:22</time></a>			</header><!-- .comment-meta -->

			
			<section class="comment-content comment">
				<p>Was the camera recognized when you ran <code>lsusb</code>?  You could also try <code>sudo apt-cache search v4l</code> and then install whatever seems appropriate.  Unfortunately, I do not have the B+ or the camera module so I can’t test.  I also found <a href="http://www.slblabs.com/2012/09/26/rpi-webcam-stream/#comment-36957" onclick="_gaq.push([&#39;_trackEvent&#39;, &#39;outbound-comment&#39;, &#39;http://www.slblabs.com/2012/09/26/rpi-webcam-stream/#comment-36957&#39;, &#39;a comment&#39;]);" target="_blank" rel="nofollow">a comment</a> that might give you some more clues.</p>
							</section><!-- .comment-content -->

			<div class="reply">
				<a class="comment-reply-link" href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?replytocom=346#respond" onclick="return addComment.moveForm(&quot;comment-346&quot;, &quot;346&quot;, &quot;respond&quot;, &quot;1659&quot;)">Reply</a> <span>↓</span>			</div><!-- .reply -->
		</article><!-- #comment-## -->
	<ol class="children">
	<li class="comment even depth-3" id="li-comment-347">
		<article id="comment-347" class="comment">
			<header class="comment-meta comment-author vcard">
				<img alt="" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/2aeaf1cfbed24ac47d47387de02ea37c" class="avatar avatar-44 photo" height="44" width="44"><cite><b class="fn">Glen Page</b> </cite><a href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/#comment-347"><time datetime="2014-10-24T12:21:02+00:00">2014-10-24 at 12:21</time></a>			</header><!-- .comment-meta -->

			
			<section class="comment-content comment">
				<p>Here is the output from lsusb<br>
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.<br>
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br>
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.<br>
Bus 001 Device 004: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter<br>
Bus 001 Device 005: ID 046d:c313 Logitech, Inc. Internet 350 Keyboard</p>
<p>sudo apt-cache search v41<br>
returns<br>
xserver-xorg-video-radeon – X.Org X server — AMD/ATI Radeon display driver</p>
<p>Will look a the comment you linked in a few minutes – have to do some real work (the stuff they pay me for).</p>
							</section><!-- .comment-content -->

			<div class="reply">
				<a class="comment-reply-link" href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?replytocom=347#respond" onclick="return addComment.moveForm(&quot;comment-347&quot;, &quot;347&quot;, &quot;respond&quot;, &quot;1659&quot;)">Reply</a> <span>↓</span>			</div><!-- .reply -->
		</article><!-- #comment-## -->
	<ol class="children">
	<li class="comment byuser comment-author-jacobsalmela bypostauthor odd alt depth-4" id="li-comment-354">
		<article id="comment-354" class="comment">
			<header class="comment-meta comment-author vcard">
				<img alt="" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/e9bc91bf7a318cbe562b3a954fab870f" class="avatar avatar-44 photo" height="44" width="44"><cite><b class="fn"><a href="http://www.jacobsalmela.com/" rel="external nofollow" class="url">Jacob Salmela</a></b> <span>Post author</span></cite><a href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/#comment-354"><time datetime="2014-10-28T08:20:43+00:00">2014-10-28 at 08:20</time></a>			</header><!-- .comment-meta -->

			
			<section class="comment-content comment">
				<p>I haven’t tested this, but maybe these utilities will help?<br>
<code>sudo apt-get install v4l-utils v4l-conf</code></p>
							</section><!-- .comment-content -->

			<div class="reply">
				<a class="comment-reply-link" href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/?replytocom=354#respond" onclick="return addComment.moveForm(&quot;comment-354&quot;, &quot;354&quot;, &quot;respond&quot;, &quot;1659&quot;)">Reply</a> <span>↓</span>			</div><!-- .reply -->
		</article><!-- #comment-## -->
	</li><!-- #comment-## -->
</ol><!-- .children -->
</li><!-- #comment-## -->
</ol><!-- .children -->
</li><!-- #comment-## -->
</ol><!-- .children -->
</li><!-- #comment-## -->
		</ol><!-- .commentlist -->

		
		
	
						
		<div id="respond" class="comment-respond">
			<h3 id="reply-title" class="comment-reply-title">Leave a Reply <small><a rel="nofollow" id="cancel-comment-reply-link" href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/#respond" style="display:none;">Cancel reply</a></small></h3>
			<div id="commentform" class="comment-form">
				<iframe src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/saved_resource.html" allowtransparency="false" style="width: 100%; height: 58px; border: 0px;" frameborder="0" scrolling="no" name="jetpack_remote_comment" id="jetpack_remote_comment"></iframe>
			</div>
		</div>

		
		<input type="hidden" name="comment_parent" id="comment_parent" value="">

		
</div><!-- #comments .comments-area -->
			
		</div><!-- #content -->
	</div><!-- #primary -->


			<div id="secondary" class="widget-area" role="complementary"><div class="googlepublisherpluginad" style="text-align: center; width: 100%; height: auto; clear: none;"><ins class="adsbygoogle" data-ad-client="ca-pub-1980021850534238" data-ad-slot="2278871934" data-ad-format="auto" data-tag-origin="pso" style="display: block; margin: 10px auto; background-color: transparent;"></ins></div>
					<aside id="recent-posts-2" class="widget widget_recent_entries">		<h3 class="widget-title">Recent Posts</h3>		<ul>
					<li>
				<a href="http://jacobsalmela.com/ubersicht-more-style-geektool/">Übersicht Has More Style Than GeekTool</a>
							<span class="post-date">2014-10-29</span>
						</li>
					<li>
				<a href="http://jacobsalmela.com/create-set-scripts-say-digitally/">Create a Set of Scripts to Say “No” Digitally</a>
							<span class="post-date">2014-10-29</span>
						</li>
					<li>
				<a href="http://jacobsalmela.com/roll-own-ventir-trojan-detection-os-x/">Roll-you-own Ventir Trojan Detector for OS X</a>
							<span class="post-date">2014-10-24</span>
						</li>
					<li>
				<a href="http://jacobsalmela.com/os-x-yosemite-enable-access-assistive-devices-command-line/">OS X Yosemite: Enable Access for Assistive Devices Command Line</a>
							<span class="post-date">2014-10-22</span>
						</li>
					<li>
				<a href="http://jacobsalmela.com/folder-actions-yosemite-broken-use-launchd-instead/">Folder Actions On Yosemite Broken? Use launchd Instead</a>
							<span class="post-date">2014-10-21</span>
						</li>
					<li>
				<a href="http://jacobsalmela.com/os-xs-native-5-finger-5-minute-system-diagnosis/">OS X’s Native 5-finger, 5-minute System Diagnosis</a>
							<span class="post-date">2014-10-17</span>
						</li>
				</ul>
		</aside><aside id="text-41" class="widget widget_text">			<div class="textwidget"><a href="http://www.kqzyfj.com/click-7580716-10862037" target="_top">
<img src="http://www.lduhtrp.net/image-7580716-10862037" width="0" height="0" alt="Web Hosting with cPanel - only $1 / month from GoDaddy" border="0" style="display: none !important; visibility: hidden !important; opacity: 0 !important; background-position: 120px 240px;"></a></div>
		</aside><aside id="text-40" class="widget widget_text">			<div class="textwidget"><a href="http://www.anrdoezrs.net/qa115ar-xrzEMKNFMGLEGGOIOIHN" target="_blank" onmouseover="window.status=&#39;http://www.otterbox.com&#39;;return true;" onmouseout="window.status=&#39; &#39;;return true;">
<img src="http://www.tqlkg.com/b766qmqeki3B9C4B5A355D7D76C" alt="" border="0" width="0" height="0" style="display: none !important; visibility: hidden !important; opacity: 0 !important; background-position: 0px 0px;"></a></div>
		</aside><aside id="tag_cloud-2" class="widget widget_tag_cloud"><h3 class="widget-title">Tags</h3><div class="tagcloud"><a href="http://jacobsalmela.com/tag/adtrap-2/" class="tag-link-111" title="4 topics" style="font-size: 13.490196078431pt;">adtrap</a>
<a href="http://jacobsalmela.com/tag/automation/" class="tag-link-97" title="5 topics" style="font-size: 14.588235294118pt;">automation</a>
<a href="http://jacobsalmela.com/tag/automator/" class="tag-link-118" title="1 topic" style="font-size: 8pt;">automator</a>
<a href="http://jacobsalmela.com/tag/casper-2/" class="tag-link-93" title="4 topics" style="font-size: 13.490196078431pt;">casper</a>
<a href="http://jacobsalmela.com/tag/chrome/" class="tag-link-102" title="1 topic" style="font-size: 8pt;">chrome</a>
<a href="http://jacobsalmela.com/tag/cli/" class="tag-link-124" title="10 topics" style="font-size: 18.156862745098pt;">cli</a>
<a href="http://jacobsalmela.com/tag/diy/" class="tag-link-100" title="4 topics" style="font-size: 13.490196078431pt;">diy</a>
<a href="http://jacobsalmela.com/tag/dns/" class="tag-link-85" title="2 topics" style="font-size: 10.470588235294pt;">dns</a>
<a href="http://jacobsalmela.com/tag/dropbox/" class="tag-link-137" title="2 topics" style="font-size: 10.470588235294pt;">dropbox</a>
<a href="http://jacobsalmela.com/tag/geektool/" class="tag-link-136" title="2 topics" style="font-size: 10.470588235294pt;">geektool</a>
<a href="http://jacobsalmela.com/tag/hacks-2/" class="tag-link-122" title="9 topics" style="font-size: 17.607843137255pt;">hacks</a>
<a href="http://jacobsalmela.com/tag/hardening/" class="tag-link-84" title="1 topic" style="font-size: 8pt;">hardening</a>
<a href="http://jacobsalmela.com/tag/hurricaneelectric/" class="tag-link-103" title="8 topics" style="font-size: 16.921568627451pt;">hurricaneelectric</a>
<a href="http://jacobsalmela.com/tag/ipv6-2/" class="tag-link-87" title="8 topics" style="font-size: 16.921568627451pt;">ipv6</a>
<a href="http://jacobsalmela.com/tag/itcertifications/" class="tag-link-88" title="9 topics" style="font-size: 17.607843137255pt;">itcertifications</a>
<a href="http://jacobsalmela.com/tag/jamf/" class="tag-link-130" title="1 topic" style="font-size: 8pt;">jamf</a>
<a href="http://jacobsalmela.com/tag/malware/" class="tag-link-121" title="4 topics" style="font-size: 13.490196078431pt;">malware</a>
<a href="http://jacobsalmela.com/tag/openvpn/" class="tag-link-92" title="2 topics" style="font-size: 10.470588235294pt;">openvpn</a>
<a href="http://jacobsalmela.com/tag/osx/" class="tag-link-89" title="19 topics" style="font-size: 21.725490196078pt;">osx</a>
<a href="http://jacobsalmela.com/tag/os-x-administration/" class="tag-link-126" title="13 topics" style="font-size: 19.666666666667pt;">os x administration</a>
<a href="http://jacobsalmela.com/tag/preview/" class="tag-link-134" title="3 topics" style="font-size: 12.117647058824pt;">preview</a>
<a href="http://jacobsalmela.com/tag/projects-2/" class="tag-link-112" title="5 topics" style="font-size: 14.588235294118pt;">projects</a>
<a href="http://jacobsalmela.com/tag/raspberrypi/" class="tag-link-82" title="14 topics" style="font-size: 20.078431372549pt;">raspberrypi</a>
<a href="http://jacobsalmela.com/tag/roll-your-own/" class="tag-link-128" title="9 topics" style="font-size: 17.607843137255pt;">roll-your-own</a>
<a href="http://jacobsalmela.com/tag/scripting/" class="tag-link-96" title="8 topics" style="font-size: 16.921568627451pt;">scripting</a>
<a href="http://jacobsalmela.com/tag/single-user-mode-2/" class="tag-link-116" title="2 topics" style="font-size: 10.470588235294pt;">single-user mode</a>
<a href="http://jacobsalmela.com/tag/ssh/" class="tag-link-83" title="1 topic" style="font-size: 8pt;">ssh</a>
<a href="http://jacobsalmela.com/tag/standards/" class="tag-link-109" title="1 topic" style="font-size: 8pt;">standards</a>
<a href="http://jacobsalmela.com/tag/star-trek/" class="tag-link-127" title="3 topics" style="font-size: 12.117647058824pt;">star trek</a>
<a href="http://jacobsalmela.com/tag/timemanagement/" class="tag-link-105" title="1 topic" style="font-size: 8pt;">timemanagement</a>
<a href="http://jacobsalmela.com/tag/tips/" class="tag-link-133" title="20 topics" style="font-size: 22pt;">tips</a>
<a href="http://jacobsalmela.com/tag/unicode/" class="tag-link-108" title="1 topic" style="font-size: 8pt;">unicode</a>
<a href="http://jacobsalmela.com/tag/weird-2/" class="tag-link-107" title="5 topics" style="font-size: 14.588235294118pt;">weird</a></div>
</aside>		<div class="googlepublisherpluginad" style="text-align: center; width: 100%; height: auto; clear: both;"><ins class="adsbygoogle" data-ad-client="ca-pub-1980021850534238" data-ad-slot="3755605135" data-ad-format="auto" data-tag-origin="pso" style="display: block; margin: 10px auto; background-color: transparent;"></ins></div></div><!-- #secondary -->
		</div><!-- #main .wrapper -->
	<footer id="colophon" role="contentinfo">
		<div class="site-info">
						<a href="http://wordpress.org/" title="Semantic Personal Publishing Platform">Proudly powered by WordPress</a>
		</div><!-- .site-info -->
	</footer><!-- #colophon -->
</div><!-- #page -->

<script><!--
dynamicgoogletags.update();
//--></script>
	<script type="text/javascript">
		WPCOM_sharing_counts = {"http:\/\/jacobsalmela.com\/raspberry-pi-webcam-using-mjpg-streamer-over-internet\/":1659}	</script>
	<div id="sharing_email" style="display: none;">
		<form action="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre.html" method="post">
			<label for="target_email">Send to Email Address</label>
			<input type="email" name="target_email" id="target_email" value="">

			
				<label for="source_name">Your Name</label>
				<input type="text" name="source_name" id="source_name" value="">

				<label for="source_email">Your Email Address</label>
				<input type="email" name="source_email" id="source_email" value="">

			
			
			<img style="float: right; display: none" class="loading" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/loading.gif" alt="loading" width="16" height="16">
			<input type="submit" value="Send Email" class="sharing_send">
			<a href="http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/#cancel" class="sharing_cancel">Cancel</a>

			<div class="errors errors-1" style="display: none;">
				Post was not sent - check your email addresses!			</div>

			<div class="errors errors-2" style="display: none;">
				Email check failed, please try again			</div>

			<div class="errors errors-3" style="display: none;">
				Sorry, your blog cannot share posts by email.			</div>
		</form>
	</div>
		<script type="text/javascript">
		jQuery(document).on( 'ready post-load', function(){
			jQuery( 'a.share-pocket' ).on( 'click', function() {
				window.open( jQuery(this).attr( 'href' ), 'wpcompocket', 'menubar=1,resizable=1,width=450,height=450' );
				return false;
			});
		});
		</script>
				<script type="text/javascript">
		jQuery(document).on( 'ready post-load', function(){
			jQuery( 'a.share-twitter' ).on( 'click', function() {
				window.open( jQuery(this).attr( 'href' ), 'wpcomtwitter', 'menubar=1,resizable=1,width=600,height=350' );
				return false;
			});
		});
		</script>
				<script type="text/javascript">
		jQuery(document).on( 'ready post-load', function(){
			jQuery( 'a.share-facebook' ).on( 'click', function() {
				window.open( jQuery(this).attr( 'href' ), 'wpcomfacebook', 'menubar=1,resizable=1,width=600,height=400' );
				return false;
			});
		});
		</script>
				<script type="text/javascript">
		jQuery(document).on( 'ready post-load', function(){
			jQuery( 'a.share-google-plus-1' ).on( 'click', function() {
				window.open( jQuery(this).attr( 'href' ), 'wpcomgoogle-plus-1', 'menubar=1,resizable=1,width=480,height=550' );
				return false;
			});
		});
		</script>
							<script type="text/javascript">
			jQuery(document).on('ready', function(){
				jQuery('body').on('click', 'a.share-pinterest', function(e){
					e.preventDefault();

					// Load Pinterest Bookmarklet code
					var s = document.createElement("script");
					s.type = "text/javascript";
					s.src = window.location.protocol + "//assets.pinterest.com/js/pinmarklet.js?r=" + ( Math.random() * 99999999 );
					var x = document.getElementsByTagName("script")[0];
					x.parentNode.insertBefore(s, x);

					// Trigger Stats
					var s = document.createElement("script");
					s.type = "text/javascript";
					s.src = this + ( this.toString().indexOf( '?' ) ? '&' : '?' ) + 'js_only=1';
					var x = document.getElementsByTagName("script")[0];
					x.parentNode.insertBefore(s, x);
				});
			});
			</script>
				<script type="text/javascript">
		jQuery(document).on( 'ready post-load', function(){
			jQuery( 'a.share-tumblr' ).on( 'click', function() {
				window.open( jQuery(this).attr( 'href' ), 'wpcomtumblr', 'menubar=1,resizable=1,width=450,height=450' );
				return false;
			});
		});
		</script>
				<script type="text/javascript">
		jQuery(document).on( 'ready post-load', function(){
			jQuery( 'a.share-linkedin' ).on( 'click', function() {
				window.open( jQuery(this).attr( 'href' ), 'wpcomlinkedin', 'menubar=1,resizable=1,width=580,height=450' );
				return false;
			});
		});
		</script>
				<iframe src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/master.html" scrolling="no" id="likes-master" name="likes-master" style="display:none;"></iframe>
		<div id="likes-other-gravatars"><div class="likes-text"><span>%d</span> bloggers like this:</div><ul class="wpl-avatars sd-like-gravatars"></ul></div>
		<script type="text/javascript">
		//<![CDATA[
			var jetpackLikesWidgetQueue = [];
			var jetpackLikesWidgetBatch = [];
			var jetpackLikesMasterReady = false;

			function JetpackLikespostMessage( message, target ) {
				if ( "string" === typeof message ){
					try{
						message = JSON.parse( message );
					}
					catch(e) {
						return;
					}
				}

				pm( {
					target: target,
					type: 'likesMessage',
					data: message,
					origin: '*'
				} );
			}

			function JetpackLikesBatchHandler() {
				var requests = [];
				jQuery( 'div.jetpack-likes-widget-unloaded' ).each( function( i ) {
					if ( jetpackLikesWidgetBatch.indexOf( this.id ) > -1 )
						return;
					jetpackLikesWidgetBatch.push( this.id );
					var regex = /like-(post|comment)-wrapper-(\d+)-(\d+)-(\w+)/;
					var match = regex.exec( this.id );
					if ( ! match || match.length != 5 )
						return;

					var info = {
						blog_id: match[2],
						width:   this.width
					};

					if ( 'post' == match[1] ) {
						info.post_id = match[3];
					} else if ( 'comment' == match[1] ) {
						info.comment_id = match[3];
					}

					info.obj_id = match[4];

					requests.push( info );
				});

				if ( requests.length > 0 ) {
					JetpackLikespostMessage( { event: 'initialBatch', requests: requests }, window.frames['likes-master'] );
				}
			}

			function JetpackLikesMessageListener( event ) {
				if ( "undefined" == typeof event.event )
					return;

				if ( 'masterReady' == event.event ) {
					jQuery( document ).ready( function() {
						jetpackLikesMasterReady = true;

						var stylesData = {
								event: 'injectStyles'
						};

						if ( jQuery( 'iframe.admin-bar-likes-widget' ).length > 0 ) {
							JetpackLikespostMessage( { event: 'adminBarEnabled' }, window.frames[ 'likes-master' ] );

							stylesData.adminBarStyles = {
								background: jQuery( '#wpadminbar .quicklinks li#wp-admin-bar-wpl-like > a' ).css( 'background' ),
								isRtl: ( 'rtl' == jQuery( '#wpadminbar' ).css( 'direction' ) )
							};
						}

						if ( !window.addEventListener )
							jQuery( '#wp-admin-bar-admin-bar-likes-widget' ).hide();

						stylesData.textStyles = {
							color: jQuery( '.sd-text-color').css( 'color' ),
							fontFamily: jQuery( '.sd-text-color' ).css( 'font-family' ),
							fontSize: jQuery( '.sd-text-color' ).css( 'font-size' ),
							direction: jQuery( '.sd-text-color' ).css( 'direction' ),
							fontWeight: jQuery( '.sd-text-color' ).css( 'font-weight' ),
							fontStyle: jQuery( '.sd-text-color' ).css( 'font-style' ),
							textDecoration: jQuery( '.sd-text-color' ).css('text-decoration')
						};

						stylesData.linkStyles = {
							color: jQuery( '.sd-link-color' ).css('color'),
							fontFamily: jQuery( '.sd-link-color' ).css('font-family'),
							fontSize: jQuery( '.sd-link-color' ).css('font-size'),
							textDecoration: jQuery( '.sd-link-color' ).css('text-decoration'),
							fontWeight: jQuery( '.sd-link-color' ).css( 'font-weight' ),
							fontStyle: jQuery( '.sd-link-color' ).css( 'font-style' )
						};

						JetpackLikespostMessage( stylesData, window.frames[ 'likes-master' ] );

						JetpackLikesBatchHandler();

						jQuery( document ).on( 'inview', 'div.jetpack-likes-widget-unloaded', function() {
							jetpackLikesWidgetQueue.push( this.id );
						});
					});
				}

				if ( 'showLikeWidget' == event.event ) {
					jQuery( '#' + event.id + ' .post-likes-widget-placeholder'  ).fadeOut( 'fast', function() {
						jQuery( '#' + event.id + ' .post-likes-widget' ).fadeIn( 'fast', function() {
							JetpackLikespostMessage( { event: 'likeWidgetDisplayed', blog_id: event.blog_id, post_id: event.post_id, obj_id: event.obj_id }, window.frames['likes-master'] );
						});
					});
				}

				if ( 'clickReblogFlair' == event.event ) {
					wpcom_reblog.toggle_reblog_box_flair( event.obj_id );
				}

				if ( 'showOtherGravatars' == event.event ) {
					var $container = jQuery( '#likes-other-gravatars' );
					var $list = $container.find( 'ul' );

					$container.hide();
					$list.html( '' );

					$container.find( '.likes-text span' ).text( event.total );

					jQuery.each( event.likers, function( i, liker ) {
						$list.append( '<li class="' + liker.css_class + '"><a href="' + liker.profile_URL + '" class="wpl-liker" rel="nofollow" target="_parent"><img src="' + liker.avatar_URL + '" alt="' + liker.name + '" width="30" height="30" style="padding-right: 3px;" /></a></li>');
					} );

					var offset = jQuery( "[name='" + event.parent + "']" ).offset();

					$container.css( 'left', offset.left + event.position.left - 10 + 'px' );
					$container.css( 'top', offset.top + event.position.top - 33 + 'px' );

					var rowLength = Math.floor( event.width / 37 );
					var height = ( Math.ceil( event.likers.length / rowLength ) * 37 ) + 13;
					if ( height > 204 ) {
						height = 204;
					}

					$container.css( 'height', height + 'px' );
					$container.css( 'width', rowLength * 37 - 7 + 'px' );

					$list.css( 'width', rowLength * 37 + 'px' );

					$container.fadeIn( 'slow' );

					var scrollbarWidth = $list[0].offsetWidth - $list[0].clientWidth;
					if ( scrollbarWidth > 0 ) {
						$container.width( $container.width() + scrollbarWidth );
						$list.width( $list.width() + scrollbarWidth );
					}
				}
			}

			pm.bind( 'likesMessage', function(e) { JetpackLikesMessageListener(e); } );

			jQuery( document ).click( function( e ) {
				var $container = jQuery( '#likes-other-gravatars' );

				if ( $container.has( e.target ).length === 0 ) {
					$container.fadeOut( 'slow' );
				}
			});

			function JetpackLikesWidgetQueueHandler() {
				var wrapperID;
				if ( ! jetpackLikesMasterReady ) {
					setTimeout( JetpackLikesWidgetQueueHandler, 500 );
					return;
				}

				if ( jetpackLikesWidgetQueue.length > 0 ) {
					// We may have a widget that needs creating now
					var found = false;
					while( jetpackLikesWidgetQueue.length > 0 ) {
						// Grab the first member of the queue that isn't already loading.
						wrapperID = jetpackLikesWidgetQueue.splice( 0, 1 )[0];
						if ( jQuery( '#' + wrapperID ).hasClass( 'jetpack-likes-widget-unloaded' ) ) {
							found = true;
							break;
						}
					}
					if ( ! found ) {
						setTimeout( JetpackLikesWidgetQueueHandler, 500 );
						return;
					}
				} else if ( jQuery( 'div.jetpack-likes-widget-unloaded' ).length > 0 ) {
					// Grab any unloaded widgets for a batch request
					JetpackLikesBatchHandler();

					// Get the next unloaded widget
					wrapperID = jQuery( 'div.jetpack-likes-widget-unloaded' ).first()[0].id;
					if ( ! wrapperID ) {
						// Everything is currently loaded
						setTimeout( JetpackLikesWidgetQueueHandler, 500 );
						return;
					}
				}

				if ( 'undefined' === typeof wrapperID ) {
					setTimeout( JetpackLikesWidgetQueueHandler, 500 );
					return;
				}

				var $wrapper = jQuery( '#' + wrapperID );
				$wrapper.find( 'iframe' ).remove();

				if ( $wrapper.hasClass( 'slim-likes-widget' ) ) {
					$wrapper.find( '.post-likes-widget-placeholder' ).after( "<iframe class='post-likes-widget jetpack-likes-widget' name='" + $wrapper.data( 'name' ) + "' height='22px' width='68px' frameBorder='0' scrolling='no' src='" + $wrapper.data( 'src' ) + "'></iframe>" );
				} else {
					$wrapper.find( '.post-likes-widget-placeholder' ).after( "<iframe class='post-likes-widget jetpack-likes-widget' name='" + $wrapper.data( 'name' ) + "' height='55px' width='100%' frameBorder='0' src='" + $wrapper.data( 'src' ) + "'></iframe>" );
				}

				$wrapper.removeClass( 'jetpack-likes-widget-unloaded' ).addClass( 'jetpack-likes-widget-loading' );

				$wrapper.find( 'iframe' ).load( function( e ) {
					var $iframe = jQuery( e.target );
					$wrapper.removeClass( 'jetpack-likes-widget-loading' ).addClass( 'jetpack-likes-widget-loaded' );

					JetpackLikespostMessage( { event: 'loadLikeWidget', name: $iframe.attr( 'name' ), width: $iframe.width() }, window.frames[ 'likes-master' ] );

					if ( $wrapper.hasClass( 'slim-likes-widget' ) ) {
						$wrapper.find( 'iframe' ).Jetpack( 'resizeable' );
					}
				});
				setTimeout( JetpackLikesWidgetQueueHandler, 250 );
			}
			JetpackLikesWidgetQueueHandler();
		//]]>
		</script>
<script type="text/javascript" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/devicepx-jetpack.js"></script>
<script type="text/javascript" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/comment-reply.min.js"></script>
<script type="text/javascript" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/navigation.js"></script>
<script type="text/javascript">
/* <![CDATA[ */
var recaptcha_options = {"lang":"en"};
/* ]]> */
</script>
<script type="text/javascript" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/sharing.js"></script>

		<!--[if IE]>
		<script type="text/javascript">
		if ( 0 === window.location.hash.indexOf( '#comment-' ) ) {
			// window.location.reload() doesn't respect the Hash in IE
			window.location.hash = window.location.hash;
		}
		</script>
		<![endif]-->
		<script type="text/javascript">
			var comm_par_el = document.getElementById( 'comment_parent' ),
			    comm_par = (comm_par_el && comm_par_el.value) ? comm_par_el.value : '',
			    frame = document.getElementById( 'jetpack_remote_comment' ),
			    tellFrameNewParent;

			tellFrameNewParent = function() {
				if ( comm_par ) {
					frame.src = "http://jetpack.wordpress.com/jetpack-comment/?blogid=43628880&postid=1659&comment_registration=0&require_name_email=0&stc_enabled=1&stb_enabled=1&show_avatars=1&avatar_default=mystery&greeting=Leave+a+Reply&greeting_reply=Leave+a+Reply+to+%25s&color_scheme=light&lang=en-US&jetpack_version=3.1.1&sig=adc33a8e5f2c6d35cfceead523cde975111a5bf5#parent=http%3A%2F%2Fjacobsalmela.com%2Fraspberry-pi-webcam-using-mjpg-streamer-over-internet%2F" + '&replytocom=' + parseInt( comm_par, 10 ).toString();
				} else {
					frame.src = "http://jetpack.wordpress.com/jetpack-comment/?blogid=43628880&postid=1659&comment_registration=0&require_name_email=0&stc_enabled=1&stb_enabled=1&show_avatars=1&avatar_default=mystery&greeting=Leave+a+Reply&greeting_reply=Leave+a+Reply+to+%25s&color_scheme=light&lang=en-US&jetpack_version=3.1.1&sig=adc33a8e5f2c6d35cfceead523cde975111a5bf5#parent=http%3A%2F%2Fjacobsalmela.com%2Fraspberry-pi-webcam-using-mjpg-streamer-over-internet%2F";
				}
			};

	
			if ( 'undefined' !== typeof addComment ) {
				addComment._Jetpack_moveForm = addComment.moveForm;

				addComment.moveForm = function( commId, parentId, respondId, postId ) {
					var returnValue = addComment._Jetpack_moveForm( commId, parentId, respondId, postId ), cancelClick, cancel;

					if ( false === returnValue ) {
						cancel = document.getElementById( 'cancel-comment-reply-link' );
						cancelClick = cancel.onclick;
						cancel.onclick = function() {
							var cancelReturn = cancelClick.call( this );
							if ( false !== cancelReturn ) {
								return cancelReturn;
							}

							if ( !comm_par ) {
								return cancelReturn;
							}

							comm_par = 0;

							tellFrameNewParent();

							return cancelReturn;
						};
					}

					if ( comm_par == parentId ) {
						return returnValue;
					}

					comm_par = parentId;

					tellFrameNewParent();

					return returnValue;
				};
			}

	
			if ( window.postMessage ) {
				if ( document.addEventListener ) {
					window.addEventListener( 'message', function( event ) {
						if ( "http:\/\/jetpack.wordpress.com" !== event.origin ) {
							return;
						}

						jQuery( frame ).height( event.data );
					} );
				} else if ( document.attachEvent ) {
					window.attachEvent( 'message', function( event ) {
						if ( "http:\/\/jetpack.wordpress.com" !== event.origin ) {
							return;
						}

						jQuery( frame ).height( event.data );
					} );
				}
			}
		</script>

	
	<script src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/e-201444.js" type="text/javascript"></script>
	<script type="text/javascript">
	st_go({v:'ext',j:'1:3.1.1',blog:'43628880',post:'1659',tz:'-5'});
	var load_cmc = function(){linktracker_init(43628880,1659,2);};
	if ( typeof addLoadEvent != 'undefined' ) addLoadEvent(load_cmc);
	else load_cmc();
	</script><img id="wpstats" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/g.gif" alt="">
<div id="woo_head" class="woo_content" style="display:none;"><script type="text/html" id="L-template"><iframe id="L-margin" name="L-margin"  class="woo_content_container woo_main_content" src="chrome-extension://hlngmmdolgbdnnimbmblfhhndibdipaf/images/loader.gif" style="display: block !important;"><p>Iframes not supported.</p></iframe></script><iframe id="L-margin" name="L-margin" class="woo_content_container woo_main_content" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/loader.html" style="display: block !important;">&lt;p&gt;Iframes not supported.&lt;/p&gt;</iframe><div id="woo_projected" class="woo_content_trigger hide_txt"><span style="display:none;"><em style="font-size:11px; font-style:normal; font-weight:bold;line-height:26px;text-indent:0;text-decoration:none;overflow:hidden;color:#fff;float:left;position:absolute;text-align:center;left:1px;top:0px;height:25px;width:22px;"></em></span><span class="loader L-loader" style="display:none;"><img class="" src="./Raspberry Pi Webcam Using MJPG-Server  Internet Live-stre_files/loader.html"></span><div id="woo_initiate" class="trigger_ctrl"><a id="clickable" href="javascript:void(0);" class="hide_txt" style="display:none;">Trigger</a></div></div><div class="woo_controllers upper_header"><a id="woo_hide" href="Javascript:void(0)" class="hide_margin hide_txt" title="Hide"><span style="background-image:url(chrome-extension://hlngmmdolgbdnnimbmblfhhndibdipaf/images/woo-cancel.png)">x</span></a></div></div><div class="tyntShIh" style="left: -100px; top: 6546px;"></div></body></html>